I am trying to hide a div class field using j query and i am unable to do so. It is a ticket field in a support form. That needs to be hidden at the beginning and reflect when a particular value is selected. I does not work. I have tried it two different ways and it does not work. Below is the HTML Code, HTML Image and the JQuery Code that i have used.
HTML:
<div class="form-field string optional request_custom_fields_21158635">
<label for="request_custom_fields_21158635">iOS Plugin Details</label>
<input id="request_custom_fields_21158635" type="text" name="request[custom_fields][21158635]">
<p>Please provide the iOS Plugin version details for your request. Example: iOS GA5.0.38</p>
</div>
J Query Code: One Hides only field and label remains visible.
var iosPluginId = "21158635";
$(document).ready(function() {
if(cust_tags == "kony_internal") {
$('#request_custom_fields_'+iosPluginId).hide();
}
});
JQuery Code: Two Both the label and field are visible.
$(".form-field string optional request_custom_fields_21158635").hide();