Skip to content

Instantly share code, notes, and snippets.

@kmgdevelopment
Created February 3, 2014 23:40
Show Gist options
  • Save kmgdevelopment/8794724 to your computer and use it in GitHub Desktop.
Save kmgdevelopment/8794724 to your computer and use it in GitHub Desktop.
In-Field Form Labels
$('form[data-infield]').on('keyup', 'input[type="text"], input[type="email"], textarea', function(){
var input = $(this);
input.toggleClass('not-empty', !!input.val());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment