• I’ve been playing with the load-post and prettyphoto js but no luck getting the prettyphoto to work after loading more posts.

    I’m a newbie to AJAX and it’s driving me crazy! This is probably super simple thing I want to work but there’s no detailed answer.

    Please help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You should try to add a callback to your javascript load-posts function. Would look something like this:

    $('.load-posts').loadposts(function(){
    	callback: function() {
    		// your prettyphoto function
    	}
    });

    Try and look into that.

    Maybe you have a link to your website for me so I can get a more specific answer for you.

    Thread Starter blackpager

    (@blackpager)

    I’m so sorry… here http://umbrellaeyes.com

    This isn’t tested, but I think it should work:

    /js/load-posts.js?ver=1.0 (Line: 42)

    // Show that we're working.
    $(this).text('LOADING POSTS ...');
    $('.tfuse_attr_post_'+ pageNum).load(tf_param + ' .post.post-item',
    
    // Prettyphoto
    $("a[rel^='prettyPhoto']").prettyPhoto();

    Thread Starter blackpager

    (@blackpager)

    I got it to work! Thank you sooooo much!!!! Basically for some weird reason I had to wait a few minutes for the code to work. The “load more posts” disappears if I test it right away. so weird…

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘prettyphoto not working after loading more posts’ is closed to new replies.