I’ve been playing around with Dojo and have created the following to change that state of a “li” parent of an “a” tag upon mouseover
for($x = 0; $x < dojo.doc.getElementById("main-menu").getElementsByTagName('a').length; $x++ ) {
var linkA = dojo.doc.getElementById("main-menu").getElementsByTagName('a')[$x];
dojo.connect(linkA, "onmouseover", function(evt){
var linkB = linkA.parentNode;
dojo.style(linkB, "opacity", 0.5);
});
}
It almost works in the right hand side menu:
http://www.mechanic-one.suburban-glory.com/
But it changes the state of the last li rather than the one corresponding to the link… any ideas how I can make this right?