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 ?
please try this
dojo.query(evt.currentTarget).next()[0]
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With