diff options
| author | timb <timb@mb.home> | 2010-01-15 19:00:03 -0800 |
|---|---|---|
| committer | timb <timb@mb.home> | 2010-01-15 19:00:03 -0800 |
| commit | 0b435f081c7f9d9f5d2e351a6d7dc0fa2504c6ba (patch) | |
| tree | 068867ece6e20dabc2a895abb27fb537268f8178 /static/js/home.js | |
| parent | 188f1e79227fabfd46bf0feff460516414395364 (diff) | |
commentz
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); }) |
