<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="./mindfor.shake.js"></script>
$.shake()
$("#element").shake();
direction (default:"left")
Type: String
A value of "left" or "right" will shake the element horizontally
vibration (default: 6)
Type: integer
Number of oscillations
amplitude (default: 50)
Type: integer
Value of the first deviation
timeFirstDeviation (default: 240)
Type: integer
Time of the first deviation
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Shake_test</title> <link href="./test.css" rel="stylesheet" type="text/css" /> <link href="./bootstrap.min.css" rel="stylesheet" /> <script src="./jquery.js"></script> <script src="./mindfor.shake.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#Btn").click(function () { $("#Input1").shake({ direction: "right" }); $("#Input2").shake({ direction: "left" }); }); }); </script> </head> <body> <div> <form class="form"> <h2>Demo</h2> <input id="Input1" class="form-control"> <br /> <input id="Input2" class="form-control"> <br /> <button id="Btn" class="btn btn-lg btn-primary btn-block" type="button">Test</button> </form> </div> </body> </html>