I need to use prettyPhoto among jQuery live method. Is there a way to do this? I tried using something like $(element).live("click", function(){ $(this).prettyPhoto(); }); but didnt work. Any idea is really appreciated.
Hi
I'm using this plugin on photos loaded through ajax.
I modified the library so it doesn't bind on links but it live binds on them. So the code looks like:
118. // Bind the code to each links
119. $(this).live('click',function(){
120. _self = this; // Fix scoping
from the code that looked like
118. // Bind the code to each links
119. $(this).each(function(){
120. $(this).bind('click',function(){
121. _self = this; // Fix scoping
It's not nice to change the library code but I can't make it work from outside.
If the library would have support for live binding it would be sweet.
So i ran into the same issue (not able to use prettyphoto with a live() event). Andrei2102 I tried your fix, and it works like a charm for displaying pictures, but not for displaying iframes... (it just opens the link in the current page). Anyone would know a fix for all prettyphoto behaviors ?
Thx in advance for help :^)
[edit] I'm using prettyphoto 2.5.6, while v3b seems heavily bugged.
Finally, I solved my problem by using the fix described here in the last comment : http://forums.no-margin-for-errors.com/comments.php?DiscussionID=300