I''m trying to loop through some divs with id="top-buttons" and setup a mouseover event but I can''t seem to get any action. Here''s the code: $$("div.top-buttons").each(function(element) { observe("mouseover", function(event) { alert("T") }); }); running on FireFox on linux with firebug and I don''t get any errors but zippo results Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
pstangcslv wrote:> I''m trying to loop through some divs with id="top-buttons" and setup a > mouseover event but I can''t seem to get any action. Here''s the code:A couple of things. ''id'' attributes have to be unique. Multiple elements can''t have the same id or you will have lots of weird thing happen.> $$("div.top-buttons").each(function(element) {This isn''t selecting div''s with id="top-buttons" it''s selecting divs with class="top-buttons". Big difference there. -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---