Jquery fadeout text insde a text box and textarea

后端 未结 2 1137
旧巷少年郎
旧巷少年郎 2020-12-19 12:19

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 tr

2条回答
  •  暖寄归人
    2020-12-19 12:44

    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.

提交回复
热议问题