links within UL not working

rayturtle

New Member
I have a UL with one list item that I'm toggling with JQuery. the list item contains a link, when I click on the link it does nothing the list item just collapses. \[code\] <script> $(function () { function toggleAccount(e) { if ($('#top-login-wrapper').hasClass('down')) { $('#top-login-wrapper').removeClass('down'); } else { $('#top-login-wrapper').addClass('down'); } } function hideAccount(e) { if ($('#top-login-wrapper').hasClass('down')) { $('#top-login-wrapper').removeClass('down'); } } $("#top-login-wrapper").click(toggleAccount); $("#top-login-wrapper").focusout(hideAccount); $("#top-login-wrapper").blur(hideAccount); });</script>\[/code\]Markup:\[code\]<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"><title></title><link href="http://stackoverflow.com/questions/15582667/css.css" rel="stylesheet" /><script src="http://stackoverflow.com/questions/15582667/jquery-1.9.0.js"></script><script src="http://stackoverflow.com/questions/15582667/jquery-1.9.0.min.js"></script> </head> <body><form id="form1" runat="server"><div> <div class="header-wrap"> <div id="accountHeader" runat="server"> <ul class="nav"> <li> <div id="top-login-wrapper"> <a href="http://stackoverflow.com/questions/15582667/#" id="login-hover-link"> <asp:Label runat="server" ID="AccountName" Text="John Doe"/> </a> div id="login-hover-cont" class="offscreen profile-widget"> <div class="inner-content"> <h3> <span><%= AccountName.Text %></span> </h3> <span class="account-avatar"> <img src="http://stackoverflow.com/questions/img/avater.gif"" alt="" /> </span> <ul class="profile-links"> <li> <a href="http://stackoverflow.com/questions/15582667/#">My Account</a> </li> <li> <a href="http://stackoverflow.com/questions/logout.aspx" runat="server" id="logout">Sign Out</a> </li> </ul> </div> <div class="profile-widget-arrow-border"></div> <div class="profile-widget-arrow"></div> </div> </div> </li> </ul> </div> </div> </div> </form> </body>\[/code\]I don't know what I'm doing wrong, can someone please help me out. JsFiddle link
 
Back
Top