Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hover effect and propagation.

 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a drop down menu. See jsfiddle. When I over on Programming it shows me a dropdown. But when I hover over first element in this case Java. It run the event on parent as well. I am not sure what is the issue. In case I try to stop propagation. It doesn't work properly see jsfiddle. Please let me know if I am doing something wrong.
Thanks.
 
Rob Crowther
author
Ranch Hand
Posts: 297
5
Android Fedora Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your problem is that you're capturing hover events on all elements - UL, LI and A. Try checking the nodeName property of the target before initiating your animation. Example.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic