Hi sir,
I have a vertical menu with some sub menus. It is working that when the top level menu is clicked the sub menu opens up. The problem is that I would like the sub menu to stay open when one of sub-menu items is clicked. As it is now, when a sub-menu item is clicked in master page the menu collapses while loading corrosponding aspx page.help me
Jquery
$(document).ready(function(){
/* This code is executed after the DOM has been completely loaded */
/* Changing thedefault easing effect - will affect the slideUp/slideDown methods: */
$.easing.def = "easeOutBounce";
/* Binding a click event handler to the links: */
$('li.button a').click(function(e){
/* Finding the drop down list that corresponds to the current section: */
var dropDown = $(this).parent().next();
/* Closing all other drop down sections, except the current one */
$('.dropdown').not(dropDown).slideUp('slow');
dropDown.slideToggle('slow');
/* Preventing the default event (which would be to navigate the browser to the link's address) */
e.preventDefault();
})
});
aspx in master page
<div id="main">
<ul class="container">
<li class="menu">
<ul>
<li class="button"><a href="#" class="profile" id="idMyProfile" onclick="keepID(this)">My Profile<span></span></a></li>
<li class="dropdown">
<ul>
<li><a onclick="open_win('EditUsers.aspx')">Manage Users</a></li>
<li><a onclick="open_win('EditClinicDetails.aspx')">Manage Clinic Profile</a></li>
<li><a onclick="open_win('EditFacilityInformatoion.aspx')">Manage Profile</a></li>
<li><a onclick="open_win('EditMedia.aspx')">Manage Gallery / Videos</a></li>
<li><a onclick="open_win('EditServicesNew.aspx')">Manage Services/Insurance</a></li>
</ul>
</li>
</ul>
</li>
<li class="menu">
<ul>
<li class="button"><a href="#" class=" practice" id="idPmanager" onclick="keepID(this)">Practice Manager <span></span></a>
</li>
<li class="dropdown">
<ul>
<li><a onclick="open_win('AppointmentManager.aspx')">Appointments</a></li>
<li><a onclick="open_win('PatientSearch.aspx?TypeId=CM&ReferPatient=No&')">Patient Manager</a></li>
<li><a onclick="open_win('ClinicVisits.aspx')">Visit Notes</a></li>
<%-- <li><a href="AppointmentManager.aspx">Appointments</a></li>
<li><a href="PatientSearch.aspx?TypeId=CM&ReferPatient=No">Patient Manager</a></li>
<li><a href="ClinicVisits.aspx">Visit Notes</a></li>--%>
<%--<li><a href="PatientSearch.aspx?TypeId=CM&ReferPatient=Yes">Refer a Patient</a></li>--%>
</ul>
</li>
</ul>
</li>
<li class="menu">
<ul>
<li class="button"><a href="#" class="practice" id="idRefPatient" onclick="keepID(this)">Refer Patient <span></span></a></li>
<li class="dropdown">
<ul>
<li><a onclick="open_win('TodaysReferel.aspx')">My Referral </a></li>
<li><a onclick="open_win('RefPatientSearch.aspx?TypeId=CM&')">Refer a Patient</a></li>
<li><a onclick="open_win('RefInwardReport.aspx')">Referal Report</a></li>
<%-- <li><a href="TodaysReferel.aspx">My Referral </a></li>
<li><a href="RefPatientSearch.aspx?TypeId=CM">Refer a Patient</a></li>
<li><a href="RefInwardReport.aspx">Referal Report</a></li>--%>
</ul>
</li>
</ul>
</li>
</ul>
</div>