Im wondering if it possible to modify a matched CSS rule's height using jquery/javascript.
This is my code so far:
css
.ac-container input:checked ~ article.prorate{
height: 450px;
}
.prorateTax {
display: none;
background: #CEF6CE;
}
jQuery
<script type="text/javascript">
$('.checkTax').change(function () {
if ($(this).attr("checked")) {
$('.prorateTax').fadeIn();
$('.ac-container input:checked ~ article.prorate').css("height", "+=47px");
} else {
$('.prorateTax').fadeOut();
$('.ac-container input:checked ~ article.prorate').css("height", "-=47px");
}
});
</script>
I have a checkbox you can select which will fade in a hidden div and then increase the height of another div to fit the new section in. I was hoping it would just modify the height of the css match provided in the css. However, instead it sets the element.style of the current div to set height. is it possible to just modify the matched CSS rule?