OZONE Asylum
Forums
DHTML/Javascript
help with a jquery menu problem
This page's ID:
31006
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
This code [code]$(document).ready(function(){ $(".accordion h3:first").addClass("active"); $(".accordion p:not(:first)").hide(); $(".accordion h3").click(function(){ $(this).next("p").slideToggle("slow").siblings("p:visible").slideUp("slow"); $(this).toggleClass("active"); $(this).siblings("h3").removeClass("active"); }); });[/code] Is taken from [url=http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/]The Web Designer Wall[/url] under the accordian example, and it seems to address your question. When a heading is clicked it toggles a class (active) on the element, and removes the class (active) from all sibling elements. Does this help? Cheers, [url=http://www.alebie.com][img]http://www.geocities.com/blaise69dude/images/BlaiseSig.gif[/img][/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »