From: Anthony Talarico Date: Wed, 24 Jan 2018 16:29:51 +0000 (-0500) Subject: adding sticky scroll for topbar in mobile X-Git-Tag: v1.0.0^2~109 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=33a4e12575dc0ac6c5395148d550875c26af21a4;p=WP-Themes%2Fwmta.git adding sticky scroll for topbar in mobile fixing the sticky in topar in mobile --- diff --git a/footer.php b/footer.php index af615e5..027ceb4 100644 --- a/footer.php +++ b/footer.php @@ -152,8 +152,18 @@ get_template_part('template-parts/search','overlay'); $('#scroller').removeClass('stuck'); $('.nav_logo').removeClass('logo-adjust'); } - }); + if( $(window).width() < 1024 ){ + $(window).scroll(function() { + if ($(window).scrollTop() > 30) { + $('.sticky-container').addClass('stuck'); + $('.nav_logo').addClass('logo-adjust'); + } else { + $('.sticky-container').removeClass('stuck'); + $('.nav_logo').removeClass('logo-adjust'); + } + }); + }