Skip to content

Instantly share code, notes, and snippets.

@tmazur
Created October 27, 2012 18:39
Show Gist options
  • Save tmazur/3965618 to your computer and use it in GitHub Desktop.
Save tmazur/3965618 to your computer and use it in GitHub Desktop.
Javascript: clickclear
$('.clickclear').each(function(){
$(this).data('cc-i-val',this.value);
}).click(function(){
if(this.value==$(this).data('cc-i-val'))
this.value='';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment