I've got the script below
<script type="text/javascript">
$(document).ready(function () {
var ChildMenusFound = $(".menu_Child").hover(function () {
//Mouse Over
alert('ok');
$(this).toggleClass("menu_hover");
}, function () {
//Mouse Out
alert('ok');
$(this).toggleClass("menu_hover");
});
});
</Script>
The html I'm outputting is as follows:
<ul alt="" class="menu_Root">
<li class="menu_Child>"
<a href="/Admin" alt="">Admin</a>
<ul alt="" class="menu_Child">
<li class="menu_SubMenu>"
<a href="/Admin/Statistics" alt="">Statistics</a></li>
<li class="menu_SubMenu>"
<a href="/Admin/Database" alt="">Database</a></li>
</ul></li>
<li class="menu_Child>"
<a href="/MyAccount" alt="">My Account</a>
<ul alt="" class="menu_Child">
<li class="menu_SubMenu>"
<a href="/MyAccount/Profile" alt="">Profile</a></li>
</ul></li>
</ul>
after the call to hover(),ChildMenusFound
contains 2 elements, firefox shows no JS errors, yet mouseover/out of the li elements doesn't cause anything to happen.
Can someone please identify my mistake?