Skip to content

Instantly share code, notes, and snippets.

@kahlil
Created September 13, 2010 15:31
Show Gist options
  • Save kahlil/577462 to your computer and use it in GitHub Desktop.
Save kahlil/577462 to your computer and use it in GitHub Desktop.
Make an element vibrate
/* from http://prashant.es/labs/vibrating-notices/ */
/* Github Project: http://github.com/phused/Vibrating-Notices */
<script src="/path/to/jquery.min.js"></script>
<script src="/path/to/jquery.vibrating-notices.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('a.vibrate').bind('click', function() {
$('#message').vibrate('x', 10, 4, 85);
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment