tags:

views:

46

answers:

1

is there a watermark jquery plugin that dont delete the watermark text when the text is in focus but deletes the watermark text first when the user is typing something in it?

then the watermark will still be visible when the first text field is automatically selected.

+1  A: 

This should be easy to manipulate if you can't find the exact plugin that you're looking for. For example, this plugin has the following as the actual clearMessage event:

input.focus(clearMessage);
input.blur(insertMessage);  
input.change(insertMessage);

Which you could just alter to say this:

input.keypress(clearMessage);
input.blur(insertMessage);  
input.change(insertMessage);
jeerose
where does it say about the clearMessage and insertMessage? couldnt find it in the link you gave me.
weng
Look at the code for the beta version: http://digitalbush.com/files/jquery/watermarkinput/beta1/jquery.watermarkinput.js And I'm not talking about features of this plugin. I'm talking about manipulating the source.
jeerose
thanks..it worked great!! have u done the same thing before? cause you replied quite fast.
weng
BTW: HTML5 has a placeholder attribute for input elements.
stefanw
and that means?:)
weng
@stefanw... sweet. HTML5 is exciting (I'm particularly excited about video tags)
jeerose