www.webdeveloper.com
Results 1 to 4 of 4

Thread: jQuery (prettyPhoto) not working on isotope infinite scroll page 2

  1. #1
    Join Date
    Feb 2013
    Posts
    1

    jQuery (prettyPhoto) not working on isotope infinite scroll page 2

    I am using isotope infinite scroll with images and prettyPhoto it is working fine on page 1 but once page 2 of the infinite scroll is loaded prettyPhoto does not work. Does anyone know how I can call / reload / reset jQuery prettyPhoto on page 2. If I view page 2 as a stand alone page jQuery / prettyPhoto works fine. Regards

  2. #2
    Join Date
    Feb 2013
    Posts
    2

    Jquery not working

    Jquery not working in my form

  3. #3
    Join Date
    Jan 2011
    Location
    United Kingdom, London
    Posts
    117
    any links to fiddle or tests? Can't help you basing on that short description

  4. #4
    Join Date
    Feb 2013
    Location
    Valencia - Venezuela
    Posts
    1
    Hello friends,

    I was having the same issue, but i got a way to solve this, is pretty easy, first, locate the function in which you call Isotope as a callback:

    function( newElements ) {

    $container.isotope( 'appended', $( newElements ) );

    // THIS IS THE CODE YOU HAVE TO ADD IN ORDER TO MAKE PRETTYPHOTO WORK WITH ISOTOPE, AND INFINITE SCROLL

    //BEGIN
    $(document).ready(function(){
    $("a[data-rel^='prettyPhoto']").prettyPhoto({
    deeplinking : false,
    hook: 'data-rel',
    keyboard_shortcuts : true,
    social_tools: ''
    });
    });

    // END


    }

    Hope it works...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles