I've got a DIV that shows on a hover event, and hides on a hover event on the #main div, but I can't help but feel like I've not done it correctly - more like a hacked together version ..
Can someone take a look and provide options for a more efficient way of doing it?
The jQuery
$(".sign_in").hover(function() {
$("#sign_box").toggle();
return false;
});
$('#sign_box').hover(function() {
$(this).show();
});
$("body #main").hover(function() {
$("#sign_box").hide();
});
The Markup
<div><a href="#" class="sign_in"><span>User Options</span></a></div>
<div id="sign_box">
<ul class="account-links">
<li><%= Html.ActionLink<EventController>( x => x.List(), "All Events" )%></li>
<li><%= Html.ActionLink<MyEventsController>( x => x.List(), "My Events" )%></li>
<li><%= Html.ActionLink<AccountController>( x => x.Edit(), "My Profile" )%></li>
<li><%= Html.ActionLink<ClubController>( x => x.List(), "All Clubs" )%></li>
<li><%= Html.ActionLink<MyClubsController>( x => x.List(), "My Clubs" )%></li>
<li><%= Html.ActionLink<AccountController>( x => x.ChangePassword(), "Change My Password" )%></li>
<li><%= Html.ActionLink<DependantController>( x => x.List(), "My Dependants" ) %></li>
</ul>
</div>
The div sign_box is set to display:none ... let me know if you need to see the CSS as well..