Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery doesn’t execute on div loaded with ajax Re: jQuery doesn’t execute on div loaded with ajax

#121195
Mottie
Member

Well whatever code you had in the page you were loading should be added to that function. I have no idea what was in that page so I didn’t know what to add in there. But there are some important questions that need to be answered first:

1.Do you have code on more than one page?

2.Does every page that needs code use the same code, like to initialize tooltips or something?

3.Could you just use [jQuery’s `delegate()`](http://api.jquery.com/delegate/) function to apply to dynamically added content?