jQuery Accordion and IE
jQuery Accordion and IE
Hi there!
It's been several hours and I still fail to find a solution for my problem.
I'm trying to build a very simple Accordion Menu, which happens to be working well so far on every browser except Internet Explorer.
So, this is how I build my html:
-
<div class="bloc">
<h3 class='section-title'>Processing</h3>
<div>
<ul>
<li><a href='#'>Britney Revisited</a></li>
<li><a href='#'>Dancing Circles</a></li>
<li><a href='#'>Helvetica</a></li>
<li><a href='#'>Be Good</a></li>
</ul>
</div>
</div>
<div class="bloc">
<h3 class='section-title'>Arduino</h3>
<div>
<ul>
<li><a href='#'>Height Finder</a></li>
<li><a href='#'>Time Clock</a></li>
<li><a href='#'>Watcher</a></li>
<li><a href='#'>Be secluded</a></li>
</ul>
</div>
</div>
And this is my jQuery code:
-
jQuery().ready( function(){
$(".section-title").next("div").hide();
$(".section-title").click( function(){
if($(".section-title").next("div").is(":hidden")) {
$(".section-title").next("div:visible").slideUp();
$(this).next("div").slideDown();
}
});
});
And my question is: why Internet Explorer is so dumb and what do I have to do to make him understand something any other browser understands witchout a fuss?