Jquery fadeout text insde a text box and textarea

◇◆丶佛笑我妖孽 提交于 2019-11-29 10:58:53

I think the only way to achieve this is by manipulating the input element's colour. Check out the JQuery color plugin that specializes in colour manipulations.

It should work along the lines of

$(formelement).animate({ color: "#FFFFFF" }, 600);

Simply surround the text in a span and fade the span. JQuery will fade the element, this is the easiest way. I am not sure there is a way to fade just text and not the entire DOM element.

Edit: Didn't read the textarea part. To do this you'll probably want to hide the actual input element and style a new one to look like a text element, and then fade the text inside it. This is commonly done to restyle the look of an input element.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!