(function(d, w) {
w.addEventListener('load', () => {
d.querySelector('main')
.style.marginTop = `${d.querySelector('header')
.offsetHeight}px`;
});
})(document, window);
(function( $ ) {
var object = {
button: '.setting-btn',
container: '.setting-content'
};
$(object.button).on('click', function() {
var form = $(object.container);
if (form.hasClass('active')) {
form.fadeOut(100).removeClass('active header-open').addClass('header-closed');
} else {
form.fadeIn(100).addClass('active header-open').removeClass('header-closed');
}
});
$(document).mouseup(function (e){
if (!$('.setting-content').is(e.target) && $('.setting').has(e.target).length === 0){
$('.setting-content').fadeOut(100).removeClass('active header-open').addClass('header-closed');
}
});
})(jQuery);