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);
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With