I want to use jQuery to expand the width of a input textbox during onclick.
For example, if the input has a default width of 100px, when the user clicks in it to ty
I'd like to build on @wsanville's example by removing the extra step on saving the original size. Animation also takes string values like '+=50' or '-=50' for increasing/decreasing the width.
See in in action on jsfiddle
$('#box').focus(function()
{
$(this).animate({ width: '+=50' }, 'slow');
}).blur(function()
{
$(this).animate({ width: '-=50' }, 'slow');
});