
November 21st, 2012, 10:19 PM
|
 |
Contributing User
|
|
Join Date: Sep 2002
Location: Seattle, U.S.A.
Posts: 712
 
Time spent in forums: 4 Days 11 h 4 m 59 sec
Reputation Power: 11
|
|
You could do something like this:
Code:
$('heading').click( function() {
// find any current active divs and hide and remove class
$(".active").each( function() {
$(this).hide();
$(this).removeClass( 'active' );
})
$(this).next(".content").slideToggle(500);
$(this).next(".content").addClass( "active" ); // not sure if you can do this but hopefully you get the idea
})
|