Made the theme responsive

This commit is contained in:
2017-07-13 18:04:03 +02:00
parent 9fe6157707
commit b0d520c95a
4 changed files with 269 additions and 22 deletions

View File

@ -21,14 +21,37 @@
// On scroll, check if the height is passed, and if so, trigger.
$(document).scroll(function(e){
if (window.scrollY >= scrollTarget) {
$('#scroll-arrow').hide(200);
$('.hidden-content').fadeIn(100);
} else if (window.scrollY < scrollTarget) {
$('.hidden-content').fadeOut(200);
$('#scroll-arrow').show(200);
if ($document.width() > 767) {
if (window.scrollY >= scrollTarget) {
$('#scroll-arrow').hide(200);
$('.hidden-content').fadeIn(100);
} else if (window.scrollY < scrollTarget) {
$('.hidden-content').fadeOut(200);
$('#scroll-arrow').show(200);
}
}
});
$(window).resize(function() {resizeHeader()});
resizeHeader();
function resizeHeader() {
if ($(window).width() > 767) {
$('.below-header').height($('.hidden-content').height());
} else {
if ($('.hidden-content').is(":visible")) {
$('.below-header').height($('.hidden-content').height() + 200);
} else {
$('.below-header').height(200);
}
}
}
$('.mobile-button').click(function() {
$('.hidden-content').fadeIn(100);
resizeHeader();
})
});
// Arctic Scroll by Paul Adam Davis