aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Hover effect and propagation. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Hover effect and propagation." Watch "Hover effect and propagation." New topic
Author

Hover effect and propagation.

pawan chopra
Ranch Hand

Joined: Jan 23, 2008
Posts: 411

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.


Pawan Chopra
SCJP - DuMmIeS mInD
Rob Crowther
author
Ranch Hand

Joined: Nov 06, 2012
Posts: 297
    
    5

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.


Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hover effect and propagation.