prettyPhoto loads on browser refresh
  • I've used prettyPhoto to display galleries, YouTube and Flash, but I'm having a "refresh" problem when I use single images. prettyPhoto opens when I click on a thumbnail and it appends #!prettyPhoto/0/ to the querystring. But when prettyPhoto closes it's not removing the /0/, so the same image opens again when the page is refreshed. I've looked at the demo page and it removes the /0/.

    My code couldn't be any simpler. Any thoughts about how to remove the /0/ or keep prettyPhoto from loading on refresh?

    This is the title

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


    My development page: http://www.sremarketing.com/untitled-3.html
  • Hi,
    you are using pp 3.1.2 with the new release (3.1.3) this issue is fixed.
  • I love the easy fixes! Thanks.
  • In 3.1.3 it still happens... I have rel="test[paintings]" in my a tag with corresponding $("a[rel^='test']").prettyPhoto().

    If i close the prettyPhoto it leaves #!prettyPhoto in my url!!! If I now press refresh in the browser, the pretty photo opens automatically and that is not what should happen!!
    Is it possible to tell it to drop the #!prettyPhoto in my url after closing?

    To make it more clear here is what happens in my URL when using it:

    page loads:
    http://test.test.nl/?p=early_period

    click on link to prettyPhoto:
    http://test.test.nl/?p=early_period#!test[paintings]/0/

    closed prettyPhoto:
    http://test.test.nl/?p=early_period#!prettyPhoto

    When I now press refresh the page reloads but the prettyPhoto opens immediately. I don't want that to happen. Url should be back to normal eg http://test.test.nl/?p=early_period

    PS also tried deeplinking: false, but it still adds #!prettyPhoto when i close it

    Thanx for any help!!
  • I am looking for an answer to this as well. Anyone?

Howdy, Stranger!

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

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter