Made the theme responsive
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user