Alert Shake is a jQuery validation plugin that shakes pieces of a form that did not validate similiar to Apple's MacBook login screen.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
alert-shake/js
GPL-License.txt
MIT-License.txt
README.md

README.md

Alert Shake

Alert Shake is a jQuery validation plugin that shakes pieces of a form that did not validate similar to Apple's MacBook login screen.

Demo

You can view a demo at http://www.initanna.com/alert-shake.

Download

Download Alert Shake

Setup

Javascript

<script type="text/javascript">
  $(document).ready(function(){
    $('#demo').alertShake();

    // when someone clicks on .submit, proc the alert
    $('.submit').click(function(){
      $('#demo').alertShake('start');
    });

    // to manually make it stop before it's finished, simply
    $('#demo').alertShake('stop');
  });
</script>

Required Files

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="alert-shake/js/jquery.alert-shake.min.js" type="text/javascript"></script>

Settings

ParameterTypeDefault ValueDescription
easingstring'linear'Easing for animating. If you use something other than 'linear' make sure you include the easing jquery plugin.
numberinteger8Number of times you want it to shake.
speedinteger10Animation duration.
amountinteger10Amount you want it to move in pixels each shake.

Browser Support

Internet Explorer 7+, Firefox, Chrome, Safari

License

Copyright (c) 2012 Anna Drazich

Dual licensed under the MIT and GPL licenses.

More information about these licenses