Amit Dhamu

Software Engineer

Wordpress Login Shake

jQuery.fn.shake = function(intShakes, intDistance, intDuration) {
    this.each(function() {
        $(this).css({position:"relative"});

        for (var x=1; x<=intShakes; x++) {
            $(this)
                .animate({left:(intDistance*-1)}, (((intDuration/intShakes)/4)))
                .animate({left:intDistance}, ((intDuration/intShakes)/2))
                .animate({left:0}, (((intDuration/intShakes)/4)));
        }
    });
    return this;
};

$('#submit').on('click', function() {
     $('#login-container').shake(3, 16, 600);
});

 shake / login / jquery / wordpress

TextArea Remaining CharactersZipArchive in PHP

Show Comments