I have a page that's called by ajax, initially the prettyPhoto works fine and loads well. When you go away from this ajaxed page and go back to this page prettyPhoto seems to spit out error in firebug and thus no longer showing:
I presume this is because I got the a tag link href set to '#'. But when removing this the api call below won't work as it finds a location for the image. What is the best way to do this then?
I'm using the API call to $.prettyPhoto.open('imagelocation'); to open a photo.
For a better glimpse of the pages here is the link:
http://goo.gl/TVJ4
go to shops gallery and click on the first image to the left, close prettyphoto and click the same image again. Or, go to another page (say, home) and go back to shops gallery and on the same image to the left click it.
I edited the main js file a little bit and made it to work however, there really seems to be a small issue with calling prettyPhoto via the api method open. The first time it seems ok but the subsequent call to the api open method gives me in firebug:
Remember, I am using the $.prettyPhoto.open('imagelocation'); api call to open the photo.. again, the subsequent and immediate call to this method gives me the error in firebug. I don't even need to get out of the page to get this error but simply click open, then click link again.
Same problem here.
If I load 2 gallerys it gives an error:
Cannot call method 'height' of undefined
in the line:
contentHeight = $pp_pic_holder.height();