Commit ef639ff1 authored by Renfred Harper's avatar Renfred Harper

Add condition for desktops for smoother transitions

parent 0427b4fe
...@@ -10,12 +10,17 @@ $(document).ready(function(){ ...@@ -10,12 +10,17 @@ $(document).ready(function(){
$(this).parent().toggleClass('active'); $(this).parent().toggleClass('active');
// Replace "About" link with the close icon // Replace "About" link with the close icon
$('#about-link-text, #about-close-nav').toggle(); $('#about-link-text, #about-close-nav').toggle();
// Hide grid to disable scrolling when info body is active if ($(window).width() >= 992){
// The delay prevents buggy scrolling on some mobile browsers // Animation for large displays
window.setTimeout(function() { $('.main-container').toggle() }, 350); $('.main-container').slideToggle(356)
$('html, body').animate({ } else {
scrollTop: 0 // Hide grid to disable scrolling when info body is active
}, 500); // The delay prevents buggy scrolling on some mobile browsers
window.setTimeout(function() { $('.main-container').toggle() }, 350);
$('html, body').animate({
scrollTop: 0
}, 500);
}
}); });
$('#about-close').click(function(){ $('#about-close').click(function(){
$('#about-link').parent().removeClass('active'); $('#about-link').parent().removeClass('active');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment