Below is the jQuery code I'm trying to use to make a hidden text box visible. However when clicked the text box stays hidden, and none of the alerts will fire.
For this check box I have tried .click, .change, and .mousedown however none has worked.
Here is the jQuery
$('#OverrideRegionInd').click(function () {
alert("here");
alert($(this).is(':checked'));
if ($(this).is(':checked')) {
$('#territoryName').html("");
$('#Region').val("");
$('#Region').show();
} else {
}
});
And here is the code from the view. This is an ASP MVC 3 site
<div class="M-editor-label">
Override Territory Manually?
</div>
<div class="M-editor-field" style="padding-right:190px;padding-top:5px;">
@Html.CheckBoxFor(Model => Model.OverrideRegionInd)
</div>
EDIT
Here is the entire <div> after it is rendered
<div class="M-editor-field" style="padding-right:190px;padding-top:5px;">
<input data-val="true" data-val-required="The Override Territory? field is required." id="OverrideRegionInd" name="OverrideRegionInd" type="checkbox" value="true" /><input name="OverrideRegionInd" type="hidden" value="false" />
</div>