JavaScript accordion effect won't work, something to do with pseudoclass?
Posted
by Dennis Hodapp
on Stack Overflow
See other posts from Stack Overflow
or by Dennis Hodapp
Published on 2010-04-13T17:34:03Z
Indexed on
2010/04/13
17:53 UTC
Read the original article
Hit count: 387
I tried to make an accordion effect with JavaScript based off this video altering a few things like using an input button instead of a link for the selector. However for some reason it's not working. Firefox error console outputs unkown pseudo-class or pseudo-element "visible"
everytime I try to use it. What's the problem?
$("div.example").hide();
$("input.exampleButton").click(function(){
$("div.example:visible").slideUp("slow");
$(this).parent().next().slideDown("slow");
//return false; if you don't want the link to follow
});
Here is the HTML
input type="button" value="See An Example" class="exampleButton" />
<div class="example">
...content
</div>
input type="button" value="See An Example" class="exampleButton" />
<div class="example">
...content
</div>
© Stack Overflow or respective owner