From researching I have found that when you load a page via ajax it only loads plain code (not jquery or javascript).
I then found a solution on this site after working out .live is depreciated.
My problem is that I can't find an event for '.on' that will load the jquery as soon as the ajax has been called (keeping in mind I am running the .on event on my index.php page).
In this fiddle, how could I get the background css changes to work on load rather than on click in the circustance that the html is being loaded via ajax?
$("#example").on('click', '.divexample', function() {
$(this).css("background-color","red");
});