I have some javascript on my main page. Later on, I load more content on user action through javascript using:
$("#div1").load(url+' #container');
My problem: I would like the javascript on the main page to apply to what is loaded now into div1. However, this doesn't happen because (I believe) only the contents in #container from 'url' are taken and therefore the javascript doesn't apply to these contents.
How do I fix this?
An example is at http://agile-thicket-6078.herokuapp.com/readers/highlight/1# after you click on the highlighted 'assembled' on the left pane and then click 'Like' on the right pane.