I am trying to show a particular element, $("#lblDischargeHeader").show(); using jquery from within a razor syntax block but the current code I have, razor is trying to treat as C# code.
@{
if (Model.Patient.PatientStatusType.Description == "Discharged")
{
$("#lblDischargeHeader").show();
<div id="DischargePanel" class="panel panel-danger" style="clear:both;">
<div class="panel-heading">Patient Discharged</div>
<div class="panel-body">
<table>
<tr>
<td><b>Date:</b></td><td>@Model.Patient.PatientDischarge.DischargeDate.ToShortDateString()</td>
<td><b>Reason:</b></td><td>@Model.Patient.PatientDischarge.Reason</td>
</tr>
</table>
</div>
</div>
}
}
I tried using the syntax: @:$("#lblDischargeHeader").show(); but all that does is render the line as text on my page.
Thank you for any assistance!