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
how to show()/remove() a textarea with jquery
Detach is what you're looking for.
You should be using show/hide because DOM operations can be expensive.
You should be using show/hide because DOM operations can be expensive.
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.
$('.Option > textarea:last').last().remove(); . . . $('<textarea ></textarea>').fadeIn('fast').appendTo('.Option');
I, um... wat.
?__?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement