prettyPhoto 3.1: New theme and ajax support

March 31st 2011

Here’s yet another update to prettyPhoto. It’s quite a big one too, I’ve decided to change the default theme and add ajax support…finally.

The theme is a collaboration between Orman Clark and Christian Budsched (Kriesi). I just saw it being used in a WordPress theme and found it so nice that I had to make it the default theme of prettyPhoto. So Orman and Christian, thank you very very much for saying yes!

Here’s the complete changelog:
Added: Ajax support.
Fixed: Long title would cause the box to jump up a bit.
Fixed: Namespaced scroll event.
Fixed: Browsing throught picture wouldn’t bring you back to the end when clicking previous while being on the first picture.
Fixed: Resize bug.
Fixed: Issue where the inline gallery would cause a preloading of the iframes.
Optimized: Gallery injection script, now 30% faster.
Changed: The YouTube embed code for the new iframe embed.
Changed: Slideshow are now enabled by default.

As usual, head over to the project page to download the latest version.

20 Responses to “prettyPhoto 3.1: New theme and ajax support”


  1. VSE says:

    Hooray for 3.1! Love the new theme you added too. Thanks!

  2. Jim Smith says:

    OMG! Love this script but it’s about to make me go mental! Am trying to get some inline content to work (iframe content works fine), however i keep getting a ‘Image cannot be loaded…” error!

    I’ve searched for hours now, and it seems to be a common issue – however I can’t find a cure for it!

    Please help!

  3. Cesar says:

    Dear all:
    Is there anyway to use the latest version without showing the image gallery thumbnails? We prefered the older version, much simpler. But the new code it is a requirement, given the problems found with the new IE9.

    Thanks, César

  4. hi Caro, does it works with wordpress? its a plugin for WP or in custom html use? tks! congrats!

  5. Serhat says:

    Hello. Is it possible to add easing effect like http://codecanyon.net/item/jquery-lightbox-evolution/115655 you dont need to publish this wish. Just asked. Thank you for big project 🙂

  6. Serhat says:

    And new wish. Add all images to prettyPhoto feature. If you are using wordpress and nextgen gallery. You can see this feature. Its perfect 🙂

  7. Christian says:

    Hi, I have a trouble….
    I want insert a link, near social images, to download the photo is viewing…is it possible? How?
    thanks!

  8. Ryan Martell says:

    Hi–

    So using the new ajax stuff- it replaces the innerHTML, which does NOT cause javascript to execute from the loaded ajax code. Using the changepicturecallback() to call a method to make the new data “live” doesn’t work either, because in showContent(), this is being called before the DOM is altered by _insert_gallery().

    My suggestion is either to move the changepicturecallback() to below the _insert_gallery() call, or if that might break historical code, add another callback – pictureloaded() or something.

    Otherwise, script looks great. Thanks!
    -R

  9. Ryan Martell says:

    Okay- disregard the above; I was looking at it wrong. The issue does still stand- the script elements aren’t executed after an ajax load. However, it can be fixed by doing this:

    $(“a[rel^=’prettyPhoto’]”).prettyPhoto(
    {
    changepicturecallback: function() {
    $(‘.pp_inline script’).each(function() {
    eval($(this).text());
    });
    }
    });

    You might think about adding that as a default option?

    Thanks!
    -R

  10. David says:

    Problems with youtube videos chrome – pp 3.1 lightbox opens up shaded darker entire screen nearly black buttons prev next play etc unclickable and shaded over, then crashes. Works fine ie 9

  11. Chriss says:

    Is there a way to make a minimum size for the pop up? Sometimes an image that is too small gets loaded and the top close button drops to the bottom and doesn’t work.

    Maybe a way to make it a minimum size of 200×200 or something would work.

  12. Stefano says:

    Hi, i’m having problem after an AJAX call. Simply this plugin stops working after i load a new content with ajax. I already tried re-initialiting the plugin in the “success” of the $.ajax but it didn’t work.

  13. Stéphane Najman says:

    Hi, I’m wondering if it would be possible to have prettyPhoto open automaticaly when entering on a page with images ?
    If yes, could you tell me which parameter I should change ?

    Thanks in advance …

  14. krupaharan says:

    Hi , am new to prettyPhoto and my problem is Pretty Photo is not supported with jQuery 1.11

    Is there any other alternative choice to avoid this version compatibility problem.

  15. I am glad that i read prettyphoto them and support.

  16. This is very great and brilliant information.

  17. raj yadav says:

    Full of star site it is https://passwordwindows10.com help the programme in the windows 10.

  18. Very Nice Article keep it up…! Thanks for sharing this amazing information with us…! keep sharing this type of stuff…!

  19. Thank you for taking to the time to write this informative blog post. It’s great article with good and useful information! I appreciate your work.

  20. Richard says:

    Very awesome theme. I like it experience and ask you all to try it and give your feedback. Visit https://windowstechsupport.org/

Leave a Reply