Ajax Issue
-
Hello!
I wanted to thank you again for helping with my previous issue, but now, another has arisen.
The posts that Ajax Load More are loading have a link in them in which when clicked, it pulls up a div and loads content via ajax. This works for my initial posts, but not for the posts that are pulled via Ajax Load More. I suspect it has to do with the jquery calls and loads prior to Ajax Load More bringing in more posts.
I’m assuming it’ll be a simple fix of adding something to the jQuery file of Ajax Load More, but I figured I’d ask the creator for assistance so I don’t muck it up.
Below is the ajax call that when a link is click, it pulls the additional info.
$.ajaxSetup({cache:false}); $(".more-results").click(function(){ var post_link = $(this).attr("href"); $('#results-overview').fadeIn('slow'); $("#results-overview").load(post_link); $(document).click(function(event) { if(!$(event.target).closest('#results-post').length) { if($('#results-post').is(":visible")) { $('#results-overview').fadeOut('slow'); } } }) $(document).ajaxComplete(function() { $('#scrollbox3').enscroll({ showOnHover: true, verticalTrackClass: 'track3', verticalHandleClass: 'handle3' }); $("#vote").click(function(){ $(this).fadeOut('slow'); $('#vote-ratings').fadeIn('slow'); }); }); return false; });As I’ve said, the code works on the initial items pulled by my main loop, but NOT the ones pulled by Ajax Load More.
Thoughts?
Thanks!
Josh
The topic ‘Ajax Issue’ is closed to new replies.