Skip to content

Instantly share code, notes, and snippets.

@shaundon
Created September 19, 2012 18:23
Show Gist options
  • Save shaundon/3751267 to your computer and use it in GitHub Desktop.
Save shaundon/3751267 to your computer and use it in GitHub Desktop.
jQuery code to bind to a search box
$(document).ready(function(){
$("#search").bind({
focus: function() {
$(this).animate({ width:200 }, 300);
},
blur: function() {
$(this).animate({ width:90 }, 300);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment