Expand input on hover

by Afsar zan

HTML

<input value=”Animate” type=”submit”>

CSS

input {
    width:100px
}

JavaScript

$(function () {
    $el = $('input');
    $('input').hover(
    function () {
        $el.stop().animate({
            width: '300px'
        });
    }, function () {
        $el.stop().animate({
            width: '100px'
        });
    });
});