Skip to content

Instantly share code, notes, and snippets.

@balazimichal
Created December 25, 2017 20:36
Show Gist options
  • Save balazimichal/7838c0dedaed4472dfce1f4217f2c687 to your computer and use it in GitHub Desktop.
Save balazimichal/7838c0dedaed4472dfce1f4217f2c687 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
$('input').focus(function(){
$enter = $(this).val();
$(this).val('');
});
$('input').blur(function(){
$leave = $(this).val();
if($leave=='') {$(this).val($enter);}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment