user2805937
user2805937

Reputation: 21

loading the appended data by ajax

Hello all i want to ask how to reload the appended data .. Actually i am having a page which goes infinite scrolling .. and i need to reload the appending elements when clicked on a particular element .. the loading is fine for the elements that are not appending (previously present when the page loads) .

loading by ajax is working fine (checked) just wana ask how to use load method of ajax for the divs in the appended data..

$("#abc").load("load.php #abc"); 

Upvotes: 0

Views: 56

Answers (1)

Patrick G
Patrick G

Reputation: 486

I think you have a problem with your events. If you are using the .click or .bind event handler of jQuery, the new added elements will not be targeted. Try $(".clickable").live("click", function()); to make also the newly added elements clickable.

As jQuery documentation says: http://api.jquery.com/live/

Attach an event handler for all elements which match the current selector, now and in the future.

Upvotes: 2

Related Questions