I want to make a dropdown menu for my website with jquery... a couple of problems occur:
- The wildcard doesnt seem to work
- It won't select it's children with ul.
HTML:
<li class="px6RANDOM">
<a href="LINK">
<span>Disclosure</span>
</a>
<ul class="subMenu">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</li>
JQuery:
$(function(){
$("li.px\\S*").children("ul").hide();
function show()
{
$(this).children("ul").show();
}
function hide()
{
$(this).children("ul").hide();
}
$("li.px\\S*").hoverIntent({
sensitivity: 1,
interval: 50,
over: show,
timeout: 1000,
out: hide
});
});
What am I doing wrong? The selector seems to be in order and the children function as well!
I'm a jquery/javascript newbie but want to learn. Please help!