Skip to content

Instantly share code, notes, and snippets.

@jensechu
Created January 17, 2012 04:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jensechu/1624592 to your computer and use it in GitHub Desktop.
Save jensechu/1624592 to your computer and use it in GitHub Desktop.
function archive_toggle(){
$("h4 a:first").addClass("accordion-selected").removeClass("accordion-deselected");
}
$(document).ready(function(){
archive_toggle();
$(".accordion-deselected h4").click(function(){
$(".accordion-selected").removeClass("accordion-selected").addClass("accordion-deselected");
$(this).removeClass(".accordion-deselected");
$(this).addClass(".accordion-selected");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment