double click on next to last image causes infinite loop
  • version 2.5.6

    double clicking on next to last image causes infinite loop in any browser.

    firebug infinitely reports this error:

    itemSrc is undefined in jquery.prettyPhoto.js Line 534
  • This was bothering me to, so I had to find some fix for this issue, and I did :)
    Insert this two lines:

    if (!images[setPosition])
    {setPosition--;}

    between:

    image_set = (jQuery(images).size() > 0) ? true : false; // Find out if it's a set
    // Hide the next/previous links if on first or last images.
    _checkPosition(jQuery(images).size());

    Result:
    image_set = (jQuery(images).size() > 0) ? true : false; // Find out if it's a set
    if (!images[setPosition])
    {setPosition--;}
    // Hide the next/previous links if on first or last images.
    _checkPosition(jQuery(images).size());

    Try it, and let me know did it worked for you.

    Nikola
  • Instead i have setted the visibility parameter of the nex button when disabled to hidden into the stylesheet.
    But I think it will better to change the markup generated for that elem, for example from anchor to span when disabled.
  • I got the error "itemSrc is undefined in jquery.prettyPhoto.js Line 534" on a single image. It was stuck in an infinite loop.

    I only wanted to display one image in the plug-in.

    To make the image display in prettyPhoto I added [gallery] to the rel attribute of the link that points to the full size image. After I added [gallery] the error dissappeared.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!