jquery - Javascript not loaded when ajax content is loaded -


i have issue relative dynamically loaded content, having sidebar has links , loads pages in way; problem relative javascript not working when pages loaded, used $document(ready) target not working @ all, hint this?

i assume you're binding events in way...

$('a').click(function () {}); 

and expecting event fire when anchor clicked within dynamic content?

try binding event element doesn't change when page loaded in eg.

$('body').on('click', 'a', function () {}); 

what happens event bound body, when click event fires on anchor bubbles body delegates anchor


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -