I have the following works that work perfectly:
$(".new_comment").ajaxStart(function() { ajaxBanner('show'); // Disable button $("input[type=submit]", this).attr("disabled", true); }); $(".new_comment").ajaxComplete(function() { ajaxBanner('hide'); // Re-enable button $("input[type=submit]", this).removeAttr("disabled"); });
The only problem is that the page is displayed with a comment form. In many cases, the comment form is dynamically entered into the page, and this is not executed.
How can I do the above live ()?
thanks
source share