Guest User

Untitled

a guest
Aug 20th, 2019
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div class="navElement">
  2. <a href="" class="navSectionTitle">Home Appliances &#43;</a>
  3. <div class="subMenuHolder">
  4. <ul>
  5. <li><a href="#">Washing Machines</a>,</li>
  6. <li><a href="#">Vacuum Cleaners</a>,</li>
  7. <li><a href="#">Microwaves</a>,</li>
  8. <li><a href="#">Ovens</a>,</li>
  9. <li><a href="#">Coffee Makers</a>,</li>
  10. <li><a href="#">Toasters</a>,</li>
  11. <li><a href="">More</a> &#43;</li>
  12.  
  13. </ul>
  14. </div>
  15. </div>
  16.  
  17. <div class="navElement">
  18. <a href="" class="navSectionTitle">Furniture &#43;</a>
  19. <div class="subMenuHolder last">
  20. <ul>
  21. <li><a href="#">Bedroom Furniture</a>,</li>
  22. <li><a href="#">Kitchen Furniture</a>,</li>
  23. <li><a href="#">Living Room Furniture</a>,</li>
  24. <li><a href="#">Outdoor Furniture</a>,</li>
  25. <li><a href="#">Office Furniture</a>,</li>
  26. <li><a href="#">Book Shelves</a>,</li>
  27. <li><a href="">More</a> &#43;</li>
  28.  
  29. </ul>
  30. </div>
  31. </div>
  32.  
  33. dojo.query(".navSectionTitle").forEach(function(node, index, nodelist){
  34. dojo.connect(node , "onmouseover", function(evt){
  35. dojo.query(node).next('.subMenuHolder')[0].style.display = 'block';
  36. });
  37. });
  38.  
  39. dojo.require("dojo.NodeList-traverse");
  40.  
  41. dojo.query(".subMenuHolder").forEach(function(n) {
  42. var l = dojo.query(n);
  43. l.parent().at(0)
  44. .onmouseenter(function(){
  45. dojo.style(l[0], "display", "block");
  46. })
  47. .onmouseleave(function(){
  48. dojo.style(l[0], "display", "none");
  49. });
  50. });
RAW Paste Data