Skip to content

Instantly share code, notes, and snippets.

@carlosrojaso
Created May 15, 2014 21:19
Show Gist options
  • Save carlosrojaso/f29388ed39fc1f9990e2 to your computer and use it in GitHub Desktop.
Save carlosrojaso/f29388ed39fc1f9990e2 to your computer and use it in GitHub Desktop.
JQ stop
// Create a button to stop all animations on the page:
$( "<button type='button'></button>" )
.text( "Stop All Animations" )
.on( "click", function() {
$( "body *" ).filter( ":animated" ).stop();
})
.appendTo( document.body );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment