This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hover effect and propagation.

 
pawan chopra
Ranch Hand
Posts: 415
jQuery Mac Objective C
  • 0
  • 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
  • 0
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic