Skip to content

Instantly share code, notes, and snippets.

@seanodotcom
Created May 10, 2010 19:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save seanodotcom/396394 to your computer and use it in GitHub Desktop.
// "shock" users when they double-click links
// by Sean-O.com
$('a').dblclick(function(){
var t = 40; // duration
$('p')
.animate({ marginLeft: '-=10' }, t)
.animate({ marginLeft: '+=10' }, t)
.animate({ marginLeft: '-=10' }, t)
.animate({ marginLeft: '+=10' }, t)
.animate({ marginLeft: '-=10' }, t)
.animate({ marginLeft: '+=10' }, t);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment