title: XPages - onClick and onMouseOver for Navigation Items
body: <p>I have an XPage which contains a Navigator control. The navigator has 3 Navigation Items, each of which is a basic node. The onClick event of the basic node executes some client side javascript. I would like to change the background color of the navigation item when it is clicked. I've tried doing this with javascript and dojo but just can't get a handle on the navigation item basic node. What code can I use to get hold of the navigation item basic node so that I can then use CSS to change it's appearance? With Dojo I have tried</p>
  
  <pre><code>dojo.query(".lotusMenuHeader ul :nth-child(1)")
  </code></pre>
  
  <p>I now have a soloution thanks to Michael Saiz.
  What I wanted to do was add the "lotusSelected" class to a Navigator item when it was clicked using client side JavaScript (and remove this class from the other items). My navigator has just three items so here is the code I'm now using to get this working:</p>
  
  <pre><code>var comp = this;
  var par = comp.parentNode; // li tag
  par.id = "parID";
  var par2 = par.parentNode; // ul tag
  par2.id = "ul_node;"
  var eigene = par2.childNodes[1];
  eigene.id = "eigene";
  var alle = par2.childNodes[3];
  alle.id = "alle";
  var abgeschlossen = par2.childNodes[5];
  abgeschlossen.id = "abgeschlossen";
  
  dojo.removeClass("alle","lotusSelected");
  dojo.removeClass("abgeschlossen","lotusSelected");
  dojo.addClass("eigene","lotusSelected")      
  </code></pre>