Discussions
Categories
Groups
Advertisement
Child Item
Home
Topics
Technology & Internet
Software & Web Development
Development
Jquery function call in jquery loaded data
Ziycon
I have data being loaded on a page using the jquery .load() function which calls a php script and is working grand. I have pagination added to the data loaded onto the page but no jquery functions work when I click on the pagination in the data that has been loaded.
Does this mean that jquery .click() function wont work on data if that data has been loaded by another jquery function and if so is there a way around this?
Find more posts tagged with
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
Advertisement
Advertisement
Comments
MOH
.click won't work for dynamically added elements.
You'll need to use .delegate or .live
Have a look at
this
[edit] Actually just re-read that properly myself, .live is deprecated, probably best using .on:
$(document).on("click", "element", function() {whatever you want to do});
Ziycon
Nice one MOH, works perfectly.