How can I constantly watch the HTML with jQuery and when a div exists, execute something.
I already had this:
if ( $( "#works_to_perform_div span.help-block.error-help-block" ).length ) {
$('#works_to_perform_div span.help-block.error-help-block').appendTo('#works_to_perform_div .question__label');
}
But that doesn't work, because the div if pushed onto the screen without a refresh.
Isn't there some like watch div -> if div exists -> do something ?