1
I have this code. The problem is that everything is working fine except the color of the text does not change.
jQuery:
$("#btnContactMob").on("click", function () {
$("#contactMob").stop(true).slideToggle(function () {
if ($('#contactMob').is(':visible')) {
$('#btnContactMob').css(
'background-color', '#FFF',
'color', '#FFF');
} else {
$('#btnContactMob').css('background-color', '#CCCCCC');
}
});
});
CSS:
#btnContactMob {
cursor: pointer;
width: 100%;
height: 55px;
color: #333;
background-color: #CCCCCC;
border-top:1px solid #1a1a1a;
font-family: Lato-Regular;
text-align: center;
padding-top: 10px;
font-size: 26px;
}
#contactMob {
width: 100%;
height:100%;
position: relative;
background-color: #FFF;
float: left;
display: none;
}
Thank you, we were missing "{}"
– Miguel
Miguel, great that it worked
– Sergio