/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).ready(function(){ $("#Nav ul li").mouseover(function() { $(this).children("ul").show(); }); $("#Nav ul li").mouseout(function() { $(this).children("ul").hide(); }); }); <ul id="Nav"> <li>Item 1 <ul> <li>Item 2</li> </ul></li> <li>Item 2</li> </ul>