diff options
Diffstat (limited to 'static/js/home.js')
| -rwxr-xr-x | static/js/home.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/static/js/home.js b/static/js/home.js index 910de02..b955d8a 100755 --- a/static/js/home.js +++ b/static/js/home.js @@ -15,12 +15,14 @@ function initHome() { // set default values for the login form only if empty if ($(id).val() == "") $(id).val(value); - + + // erase the form text when clicked only if it is filler text, otherwise select it $(id).focus(function(){ if($(id).val() == value) $(id).val("") else $(id).select() }) + // restore filler text on blur if field is empty $(id).blur(function(){ if($(id).val() == "") $(id).val(value); }) |
