I want to output a textarea based on a checkbox. I would like it to fadeIn or Slidedown, beneath the checkbox.
I have a checkbox controlling a input field with JS, like so:
function enable_text(status) {
status = (status) ? false : true; //convert status boolean to text 'disabled'
document.password.myFormName.disabled = status;
}
Can this be done with jQuery for both input and textareas if checked? Which areas of jQuery API should I research?
Many thanks
You could do it with the
slideToggle()See jsfiddle