I am trying to change the text of a button when clicked after doing an ajax call. Why doesn't this work?
HTML
<button type="submit" class="register-button">REGISTER</button>
JS
$(".register-button").click(function ()
{
$.ajax({
//some ajax stuff
}).
success(function(){
console.log("done");
$(this).html("Registered");
//$(this).hide(); doesn't work either
});
});