focus.
$("input[type='text']").on('focus', function() { $(this).animate({'width': '300px'}, 300); }).on('blur', function() { $(this).animate({'width': '200px'}, 300); });