开发者

Fading the text of a text input box

I hav开发者_开发百科e an input box $myInput = $('<input/>').val('Some text').

I would like to fade away the text of the input box, but not the input box itself. Can I use jQuery for that?


$myInput.animate({'color':'white'});

to fade it out. To fade it back

$myInput.animate({'color':'black'});

I assume you have white background on input


You can use the color animation plugin to color the text to the input's background color (most probably white).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜