javascript - prettyPhoto and Ajax-loaded content -
I am currently working on a small product display page which loads beautiful photo-enabled galleries through AJAX. The problem is that, beautifulPhotos does not work on images that started after loading the page. I understand that I need to restart beautifulness after new material load, but how? I have tried to add prettyPhoto.init (); The page that has returned to the code - which does not work
Here is the page I am working on:
I ended up looking for two solutions. First and foremost was putting this whole bit:
$ (document) .ready (function () {$ ("a [rel ^ = 'prettyphoto']"). PrettyPhoto () ;});
In AJAX callback, not prettyPhoto.init ();
The function I was calling earlier
There was some luck with using the API instead of the beautiful photo that I had to re-load again.
Hope this helps someone
Comments
Post a Comment