This is main.js
$(document).ready(function(){
$("#otherrelg").hide();
$(".otherrelg").hide();
$("#other").click(function(){ // on click should work for <option id="other"value="6">Others</option> only but its not working
$("#otherrelg").show();
$(".otherrelg").show();
});
});
and this is index.html
<tr>
<td><label for="famreligion">9. Family Religion:</label></td>
<td><select id="famreligion" class="form-control input-sm">
<option>---Please Select---</option>
<option>Hindu</option>
<option>Muslim</option>
<option>Christian</option>
<option>Sikh</option>
<option id="other" value="6">Others</option>
</select>
</td>
<td><label class="otherrelg" for="otherrelg">Religion Name:</label></td>
<td><input id="otherrelg" type="text" class="form-control input-sm"></td>
</tr>
<tr>