I have Ajax page where I get search response inside textarea.
Here is the code
<form onSubmit="checkDomain();return false;" id="ajaxDomainForm" action="">
<input name="domain" type="text" id="domain" onKeyUp="checkForChange();" maxlength="255">
<textarea name="domainsAvailableInput" id="domainsAvailable" readonly="readonly"></textarea>
<div id='whatDomainDiv' style="font-weight:bold;display:none;">Domain</div>
<div id='isAvailableDiv' style="font-size:5em;display:none;">?</div>
</form>
What I want is to hide <textarea> until & unless it has some responded value in it.
How can achieve this using jQuery?
Thanks
This will hide your text area initially on page load.
Again when in your ajax response you get the text. you will have to write in your success callback.
jQuery('#domainsAvailable').show();