jQuery: if element gets loaded with ajax event? -
Comes with. There is a form in it and when it is submitted, this ad loads iv # error_msg
or div # success_msg
(through all AJAXs).
Is there any way to find out when one of these divisions appears? Just get what I want: When the form is presented, I want to prepaid a text in the form in the sidebar. As soon as loading two divs (either error or breakthrough) is loading in that form, I want to delete the redone element.
Do you know a way to do this? I do not want to edit the source code of the plugin!
Edit: checkMsg () is not defined! Why?
var check = 0; Function sholoder () {$ ('# mc_signup_form'). Prepaid ('& lt; span class = "Loading" & gt; Loading & lt; / span & gt;'); Check = set interval ("check meg ()", 300); } Function checkMsg () {if ($ ('(.mc_error_msg'). Length == 0 || $ ('.mc_success_msg'). Length == 0) {$ ('# mc_signup_form .loading'). Remove (); ClearInterval (probe); }}
You can ask the dot in a timeout loop that it is there or No. Furious but effective, you'd better find Ajax calls to directly tap into AJAX calls and feedback handlers.
Comments
Post a Comment