I have content on a webpage which is both sent from the server at page load, and updated frequently via AJAX. When it is loaded initally, I use $( function () {} ) to do binding and updating based on the news from the server. I want to be able to also run the code when it is repopulated, in particular to rebind click events and update with news from the server.
Is there any way to do this without doing a $.getScript separatley? I am somewhat confused on how running javascript applies when populating the screen via AJAX ( $('el').html( ... ) ) Because I often use this with included javascript and it works. Could anybody clear up how this works?