I have a button added by third part module. When click on this button, the third module sends an ajax request (I can't change the third party code). How can I hide this button on ajaxStart
and show it on ajaxStop
?
I tried:
$('#buttonId').click(function() {
$(this).ajaxStart(function() { $(this).hide(); }).ajaxStop(function() { $(this).show(); });
});
But it doesn't work right.