Created
August 29, 2013 22:24
-
-
Save jcblw/6384146 to your computer and use it in GitHub Desktop.
shake?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}); | |
}); | |
}); | |
}); | |
}); | |
} |
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
shake that head.