Skip to content

Instantly share code, notes, and snippets.

@origamid
Created March 13, 2014 21:32
Show Gist options
  • Save origamid/9537415 to your computer and use it in GitHub Desktop.
Save origamid/9537415 to your computer and use it in GitHub Desktop.
Item Toggle
$(function() {
$('dd').hide();
$('dt').each(function() {
$(this).show(0).on('click', function(e) {
e.preventDefault();
$(this).toggleClass('active');
$(this).next('dd').slideToggle();
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment