From 0b435f081c7f9d9f5d2e351a6d7dc0fa2504c6ba Mon Sep 17 00:00:00 2001 From: timb Date: Fri, 15 Jan 2010 19:00:03 -0800 Subject: commentz --- static/js/home.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'static/js/home.js') 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); }) -- cgit v1.2.3-70-g09d2