jQuery淡出文本插入文本框和textarea [英] Jquery fadeout text insde a text box and textarea

查看:91
本文介绍了jQuery淡出文本插入文本框和textarea的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该是一个非常简单的问题,但我被困住了.是否可以淡出文本框和textarea中的文本并将实际元素保留在原位.我尝试使用.html().val()等淡出,但是文本所在的元素也总是淡出.

解决方案

我认为实现此目的的唯一方法是通过操纵输入元素的颜色.查看 JQuery颜色插件 ,它专门从事颜色处理. >

它应该遵循以下原则

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

Hi this should be a really easy problem but i am stuck. Is it possible to fade out the text inside a text box and textarea and leave the actual element in place. I have tried fading out using .html() .val() etc but the element that the text is in is always faded too.

解决方案

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

这篇关于jQuery淡出文本插入文本框和textarea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆