开发者

watermark that is deleted first on keypress?

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 somethin开发者_高级运维g in it?

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


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);


I have created a jQuery plugin for this called Watermarkify. It not only displays watermarks but also animates them on focus.

Demo:

http://www.ajaybalachandran.com/demo/watermarkify/

Download:

http://www.ajaybalachandran.com/blog/48/watermarkify-jquery-twitter-like-animated-textfield-watermarks/


i have the best and easiest solution for this problem

<input value="" placeholder="watermark text:" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜