Looking to modify the height of the header by expanding and reducing it when clicking on the "arrow" div. Attempted to use addClass with jQuery without success. HTML:
<header>
<p>The title..</p>
<h1>Some text</h1>
<div class="arrow" id="arrow">
<img src="img/arrow.svg" />
</div>
</header>
CSS
header {
background: #2282A4;
color: #fff;
text-align: center;
width: 100%;
height: 450px;
transition: height 0.5 ease;
}
expandheight {
height: 850px;
}
JQuery:
$(document).ready(function() {
$(function() {
$('#arrow').click(function() {
$('header').addClass('expandheight');
});
});
});
In need of assistance in decreasing the height with the same button, removing the "expandheight" class when active and adding it when not... Struggled with if/else statements.