Marcelo de Moraes Serpa
2009-Feb-04 19:53 UTC
jQuery''s fancyZoom and delayedObserver conflict.
Hello list, I know this is more client-side stuff since I''m using Rails js helpers, I thought I would be posting here. http://pastie.org/379754 -- the delayedObserver simply doesn''t work when fancyZoom is activated (it simply fails silently). If I remove the fancyZoom related code, it works ok. Here''s a sample code: http://pastie.org/379754. Does anyone know why? Thanks, Marcelo. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Marcelo de Moraes Serpa
2009-Feb-13 00:37 UTC
Re: jQuery''s fancyZoom and delayedObserver conflict.
Ok, here''s why: fancyZoom hides the target div, and its show() method then creates a duplicate of this DOM subtree. The problem is that it keeps the same ids, and we all know we can''t have elements with the same ID -- thus, $() and getElementById fail. The solution was to be more specific and select like this: $(''#zoom-content #id''), where #zoom-content is the name of the duplicated div that fancyZoom creates, which is different from the hidden div. Marcelo. On Wed, Feb 4, 2009 at 1:53 PM, Marcelo de Moraes Serpa <celoserpa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello list, > > I know this is more client-side stuff since I''m using Rails js helpers, I > thought I would be posting here. http://pastie.org/379754 -- the > delayedObserver simply doesn''t work when fancyZoom is activated (it simply > fails silently). If I remove the fancyZoom related code, it works ok. Here''s > a sample code: http://pastie.org/379754. Does anyone know why? > > Thanks, > > Marcelo. >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---