Followers 0

# how to show()/remove() a textarea with jquery

## 5 posts in this topic

I found this code http://jsfiddle.net/uhv5R/5/ which shows and hides with a selection but I want to remove it instead of hiding it when select is no. I used the function remove() for this but when I choose yes again it wont show it again, is like once you choose remove thats it its gone. Ho could I do this

0

##### Share on other sites
Detach is what you're looking for.

You should be using show/hide because DOM operations can be expensive.
0

##### Share on other sites

So, you want to "remove instead of hiding", but then you want to show it again? If you want to show it again then hiding it makes much more sense.

Edited by DiegoSLTS
0

##### Share on other sites

$('.Option > textarea:last').last().remove(); . . .$('<textarea ></textarea>').fadeIn('fast').appendTo('.Option');


I, um... wat.

?__? Edited by fastcall22
2

##### Share on other sites

$('.Option > textarea:last').last().remove(); . . .$('<textarea ></textarea>').fadeIn('fast').appendTo('.Option');


I, um... wat.

?__?

lol the original fiddle was different I made a couple of changes, if that's what you are implying

0

## Create an account

Register a new account