toucouleur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-08 08:50 UTC
Need help on Observe with mouseout
Hi I am not quite sure if this is an expected behavior, but when using
Event.observe(), for example with mouseout, It applies the event
handler not only to the object passed, but also to all of its
childnodes.
Here''s a proof of concept:
<div id="container" style="width:500px; height:500px;
">
<div id="child1">
<a href="http://localhost/">test me
gently</a>
</div>
</div>
<script><!--
function handle_mouseOut(e) {
alert(Event.element(e).id);
} Event.observe(''container'',
''mouseout'', handle_mouseOut); -->
</script>
Could you please help me to observe only the container''s id ?
thank you!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
toucouleur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Mar-08 10:43 UTC
Re: Need help on Observe with mouseout
part of the solution can be found here : http://www.faqts.com/knowledge_base/view.phtml/aid/1606 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---