Question

I have this dropdown menu, and all i want to do is upon firing the onmouseenter event, to change the border-left of the targets next sibling to white. So far i can address the currentTarget's border-left with ease, but i cant find a way to do the same for the next sibling. Any ideas ?

Was it helpful?

Solution

please try this

dojo.query(evt.currentTarget).next()[0]

OTHER TIPS

The DOM node attribute nextSibling can be used to get the next sibling. See https://developer.mozilla.org/En/DOM/Node.nextSibling.

If you want to apply some filtering when getting next sibling, e.g. get the next sibling with a certain CSS class name, try to use dojo.query. For example,

dojo.query(node).siblings(".myClass")

returns a node list of siblings of node with class name myClass.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top