It is in the comments ... if you don't have a default value set ... you'll
need to set a value like so:

$('#element').val("Search").clearonfocus();

or if your html looks like this:

<input type="text" value="Search" ... >

then you can just call it like this:

$('#element').clearonfocus();

--
Brandon Aaron

On Thu, Jul 17, 2008 at 12:40 PM, Andy Matthews <[EMAIL PROTECTED]>
wrote:

>  I thought as much. Thanks Brandon. Standard usage applies?
>
> $('#element).clearonfocus();
>
> ?
>
>  ------------------------------
> *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Brandon Aaron
> *Sent:* Thursday, July 17, 2008 12:27 PM
> *To:* jquery-en@googlegroups.com
> *Subject:* [jQuery] Re: Input field: focus=remove text; blur=put it back
>
>  I wrote this a while back:
> http://dev.jquery.com/browser/trunk/plugins/clearonfocus/jquery.clearonfocus.js
>
> --
> Brandon Aaron
>
> On Thu, Jul 17, 2008 at 11:19 AM, Andy Matthews <[EMAIL PROTECTED]>
> wrote:
>
>>  Is there a plugin for this by chance? I know it's pretty quick to write,
>> but wanted to find out if someone's already done it better than I could.
>>
>> Also, would toggle() work for this sort of thing? Is there a focus/blur
>> toggle in the jQuery core?
>>
>> * ____________________________________
>>
>> Andy Matthews
>> *Senior ColdFusion Developer
>>
>> Office:  615.627.9747
>> Fax:  615.467.6249
>> www.dealerskins.com
>>
>> Total customer satisfaction is my number 1 priority! If you are not
>> completely satisfied with the service I have provided, please let me know
>> right away so I can correct the problem, or notify my manager Aaron West at
>> [EMAIL PROTECTED]
>>
>>
>
>

<<2008 Email NADA.jpg>>

Reply via email to