Check State
If the customer doesn't checked any upgrades
by CJ Juarez
HTML
<div>
<input type="checkbox" name="check" id="check"/>
<br>
<br>
<button>Regular</button>
<br>
<br>
<button id="large" class="active">Large</button>
</div>
CSS
h1{
display:inline;
vertical-align:middle;
}
button {
/* position: relative;*/
/* display: inline-block;*/
padding: 5px;
font-size: 15px;
cursor: pointer;
text-align: center;
text-decoration: none;
outline: none;
color: white;
background-color: #cd1338;
border: none;
border-radius: 10px;
width: 80px;
box-shadow: 0 9px #c95f74;
}
button:hover {
background-color: #b81132;
}
button:active, button.active {
background-color: #9d0f2b;
box-shadow: 0 5px #9b4959;
transform: translateY(4px);
}
JavaScript
$('#check').change(function() {
var $check = $(this);
if ($check.prop('checked')) {
$("#large").removeClass("active");
} else {
$("#large").addClass("active");
}
});