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).
精彩评论