Skip to content

Instantly share code, notes, and snippets.

@jcblw
Created August 29, 2013 22:24
Show Gist options
  • Save jcblw/6384146 to your computer and use it in GitHub Desktop.
Save jcblw/6384146 to your computer and use it in GitHub Desktop.
shake?
var shakeThis = function(elem) {
// console.log('left');
$(elem).animate({
left: "-5px"
}, 70, function() {
// console.log('right');
$(elem).animate({
left: "+5px"
}, 70, function() {
// console.log('left');
$(elem).animate({
left: "-5px"
}, 70, function() {
// console.log('right');
$(elem).animate({
left: "+5px"
}, 70, function() {
// console.log('left');
$(elem).animate({
left: "-5px"
}, 70, function() {
// console.log('right');
$(elem).animate({
left: "0"
}, 70);
});
});
});
});
});
}
@91bananas
Copy link

shake that head.

@jcblw
Copy link
Author

jcblw commented Nov 6, 2013

For future job reference I should disclaim that this is not my code but is here for educational purposes on how to not write code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment