Having trouble with the following scenario in IE.
Styles:
.tabmenu {
background-color: #990000;
display: inline-block;
width: 150px;
position: relative;
left: 59%;
border-top-left-radius: 10em;
margin-bottom: -8px;
min-width: 75px;
max-width: 150px;
font-size: 13px;
font-weight: bold;
font-style: normal;
font-family: Arial;
border: none;
padding: 5px 5px;
height: auto !important;
cursor: pointer !important;
color: #ffffff !important;
text-align: center;
}
In .cshtml file
<div class="tabmenu" style="width:100px;" onclick="btnCommonOnClick()" id="btnCommon">Common</div>
<div class="tabmenu" style="background-color:#999999!important;" onclick="EquipmentSpecificOnClick(1)" id="btnEquipment">Specific</div>
<div class="tabmenu" style="background-color:#999999!important;width:100px;" onclick=" btnUnassignedonClick(this)" id="btnUnassigned">Unassigned</div>
<div class="tabmenu" style="background-color:#999999!important;width:100px;" onclick="OrphanOnClick()" id="btnOrphan">Orphan</div>
The initial background colors display correctly. However, upon clicking a different div, the background color fails to change as expected. The code snippet used for this purpose is:
$("#btnCommon").css("background-color","#999999 !important");//grey
$("#btnEquipment").css("background-color","#999999 !important");//grey
$('#btnOrphan').css("backgroundColor","#999999!important");//grey
$('#btnUnassigned').css("backgroundColor","#990000!important");//red
This code does not work properly in IE — the targeted div remains grey instead of changing to red as intended.
Seeking any solutions?