Question

I have a few Pretty Photo images in my app, but they are opening in a new page instead of in a PrettyPhoto display.

Here's the index of my app, which is stripped down of everything not nescessary to run it.

Click the down arrow in order to view the pretty photo page.

I use the jQuery version from the download. Also PrettyPhoto and it's script are initialised right before the closing div tag.

What could possibly be wrong with it? Why are the images opening in a new page?

Thx in advance!

Was it helpful?

Solution

It's because you are calling the plugin once the document is loaded but not after clicking on the down arrow.

If you go to your site. Click on the down arrow. Open the js inspector and copy/paste this

//jQuery.noConflict();
jQuery(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto({
        social_tools: false,
        theme: 'light_square'
    });
});

You will see it's working.

So try to trigger the prettyPhoto once the pictures are loaded.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top