How can I dynamically change the CSS class of a bootstrap element based on a value?
I would like to display a div in green if the value is "OK" and red otherwise. If status = "OK", it should look like this:
<div class="small-box bg-green">
, else <div class="small-box bg-red">
.
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-green">
<div class="inner">
<h3>No-7 @Model[4].status </h3>
<p>@Model[4].devEUI.Substring(4)</p>
<p>@Model[4].datetime</p>
</div>
<div class="icon">
<i>
<img src="~/images/TransIcon.png" />
</i>
</div>
<a href="@Url.Action("7", "Transformer")" class="small-box-footer">Trans info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>