View Full Version : Accordion Menu Problems in IE

Jun 25th, 2008, 08:20 AM

I've used some simple jquery in combination with CSS to create an accordion menu for a new website that I'm developing.

The menu works perfectly in safari and firefox, but not at all in IE. I'm not sure where to being to troubleshoot this, as I am not very familiar with jquery.

Here is the relevant code:


<script type="text/javascript" language="javascript" src="css/jquery.js"></script>
<script type="text/javascript">
//slides the element with class "menu_subbody" when li with class "menu_subhead" is clicked
$("#first_pane li.menu_subhead").click(function()



<div id="first_pane" class="menu_pane">
<div style="position: relative;"><h3><img src='img/roundedCorners/dark_blue_tr.jpg' class='tr' style="top: 0;" alt="CSS Rounded Corner Image"/>Programs</h3></div>
<li class="menu_subhead"><a href="#" style="font-weight: bold;">Cardiac CT Practicum</a></li>
<ul class="menu_subbody">
<li><a href="#">General</a></li>
<li><a href="#">Description</a></li>
<li><a href="#">Lectures</a></li>
<li><a href="#">Registration</a></li>
<li><a href="#">Sample Schedule</a></li>
<li><a href="#">Evaluations</a></li>
<li><a href="#">Previous Classes</a></li>
<li><a href="#">Scheduled Dates</a></li>
<li class="menu_subhead"><a href="#" style="font-weight: bold;">CT Progress and Potential</a></li>
<ul class="menu_subbody">
<li><a href="#">General</a></li>
<li><a href="#">Description</a></li>
<li><a href="#">Faculty</a></li>
<li><a href="#">Programs</a></li>
<li><a href="#">Scheduled Dates</a></li>
<li><a href="#" style="font-weight: bold;">Why take our course?</a></li>
<!-- end first_pane -->


<style type="text/css">
.menu_subbody {
display: none;
.menu_subhead {
cursor: pointer;

here is a link (http://www.jhucardiacct.org/testSite/easy-blue/index.php) to the actual site if you want to see it in action

Does anyone have any idea what could be causing this problem? It seems like things always work on firefox and safari, and then IE has to go and mess things up. Perhaps I can incorporate a noscript clause that causes the CSS to define .menu_head {display: inherit;} ?

Any help would be greatly appreciated. Thanks