I have successfully set a style when clicking on a div. However, I am looking to reset the style to default when clicked again.
$('#tray-button').click(function() {
$('.buttons-content').css('bottom', '160px');
});
<div class="buttons-content">
<div id="tray-button" class="button">
<div class="white"></div>
<div class="black"></div>
<i class="fas fa-grip-horizontal"></i>
</div>
<div class="button">
<div class="white"></div>
<div class="black"></div>
<i class="fas fa-share-alt"></i>
</div>
<div class="button play-pause play">
<div class="white"></div>
<div class="black"></div>
<i class="far fa-1-1x fa-play-circle"></i>
</div>
<div class="button rotate">
<div class="white"></div>
<div class="black"></div>
<i class="fas fa-expand-alt"></i>
</div>
</div>
buttons-content - default bottom: 40;
- When click on #tray-button -> bottom: 160px;
- When click again on #tray-button -> bottom: 40px; (default)