Skip to content

Instantly share code, notes, and snippets.

@mikespokefire
Created May 7, 2011 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikespokefire/960476 to your computer and use it in GitHub Desktop.
Save mikespokefire/960476 to your computer and use it in GitHub Desktop.
Example of jQuery toggle
$(document).ready(function() {
$('#toggler').toggle(
function() {
$('div').animate({ height: '200px' }, 2000, 'swing');
},
function() {
$('div').animate({ height: 'auto' }, 2000, 'swing');
}
);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment