I have a site where the content of a specific div updates without doing a page-load. This messes up a small jQuery script which only fires upon page-load.
I need a trick to reload that specific jQuery script whenever the content of the DIV is refreshed. I tried .on('change') but no sure if that is the best approach.
I can detect change in the Div is by monitoring the change in classes added to the div. Or maybe some sort of content supervision.
The script runs under document ready, should I put it in a function instead to make it easier to "fire at will" ?