From a343c7f4d1049d596d18e2a6e6161a62425a61f6 Mon Sep 17 00:00:00 2001 From: Seth Meranda <smeranda2@unl.edu> Date: Wed, 19 Aug 2009 19:27:28 +0000 Subject: [PATCH] added jQuery functions for the search box label. --- unl_theme/scripts/social.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/unl_theme/scripts/social.js b/unl_theme/scripts/social.js index 2650137c..efdc752f 100644 --- a/unl_theme/scripts/social.js +++ b/unl_theme/scripts/social.js @@ -1,9 +1,11 @@ WDN.jQuery(document).ready(function() { - WDN.jQuery('form#searchform label').css({display: "block"); + WDN.jQuery('form#searchform label').css({display: "block"}); WDN.jQuery('form#searchform input#search_input').focus(function(){ - if (WDN.jQuery('#wdn_search_form input#search_input').val() != "") { - WDN.jQuery(this).siblings("label").hide(); + WDN.jQuery(this).siblings("label").hide(); + }); + WDN.jQuery('form#searchform input#search_input').blur(function(){ + if (WDN.jQuery('form#searchform input#search_input').val() == "") { + WDN.jQuery(this).siblings("label").show(); }; - }) - } -}) \ No newline at end of file + }); +}); \ No newline at end of file -- GitLab