Created
March 15, 2012 18:32
-
-
Save egrouse/2045890 to your computer and use it in GitHub Desktop.
jquery is cool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready( function(){ | |
// Do the hidy boxes | |
$('a.toggle-box').click( function(){ | |
var rel = $(this).attr( 'rel' ), | |
section = $( 'section#' + rel ), | |
target = section.find( '.box' ); | |
if( section.hasClass( 'hidden' ) ) | |
{ | |
target.slideDown(); | |
section.removeClass( 'hidden' ); | |
} | |
else | |
{ | |
target.slideUp(); | |
section.addClass( 'hidden' ); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment