Shake a login form on error
<p>I have successfully built a login form using ajax and want to add a shake effect to the form when the user enters incorrect details. I have the function in place that will fire but just need to build the jquery effect <strong>(note I know of jquery UI but don't want to use it! I don't want to use ANY plugins for this)</strong></p>

<p>So far I have:</p>

<pre><code>function shakeForm() {

    var p = new Array(15, 30, 15, 0, -15, -30, -15, 0);
    p = p.concat(p.concat(p));


    $('form').css('left',p);

}
</code></pre>

<p>From what I understand I need to loop the array of values but how do I do that? Note that the element form has a position of relative already. So it's just a case of running those values as the left value in a random sequence?</p>

<p>Thanks</p>
