Re: Updated html/css

From: Date: Wed, 16 Dec 2009 07:49:09 +0000
Subject: Re: Updated html/css
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-6759@lists.php.net to get a copy of this message
On 15-Dec-09, at 2:42 AM, Richard Quadling wrote:
Upon entering the search box, the "Search ..." text should vanish. Upon exiting the search box, assuming a search ISN'T being performed and there is nothing left behind in the search box, then the "Search ..." text should be restored. I don't know jQuery, but guessing (I use Prototype). var defaultSearchText='Search ...'; // Multi-lingual option? $(document).ready(function(){ $('headsearch-keywords').focus(function(){ if (defaultSearchText = $(this).value){ $(this).value = ''; } }).blur(function(){ if ('' == $(this).value){ $(this).value = defaultSearchText; } }); });
Thanks Richard, works great!

« previous php.webmaster (#6759) next »