From 760c12485c89210547a8507296f6a5bb7a1f7256 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 9 Jun 2017 08:20:48 -0400 Subject: [PATCH] fixing the topbar jump effect on mobile and tablet the topbar needs to have sticky class removed on page load and not just on scroll resetting the padding styles on load as well --- header.php | 2 +- js/app.js | 8 +++++--- js/custom/pageSetup.js | 8 +++++--- style.css | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/header.php b/header.php index f033fa3..f26b190 100644 --- a/header.php +++ b/header.php @@ -4,7 +4,7 @@ <?php wp_title(); ?> - + diff --git a/js/app.js b/js/app.js index 327714b..3cb47b4 100644 --- a/js/app.js +++ b/js/app.js @@ -60,13 +60,15 @@ $(document).ready(function () { var scrollTop; if($(window).width() > 1023){ - sticky.addClass("fixed"); +// sticky.addClass("fixed"); page.css("padding-top", "53px"); // $(slideshow).css("margin-top", "20px"); } else if($(window).width() < 1023 && $(window).width() > 640){ - page.css("padding-top", "100px"); + sticky.removeClass("fixed"); + page.css("padding-top", "0px"); } else { - page.css("padding-top", "150px"); + page.css("padding-top", "0px"); + sticky.removeClass("fixed"); } $(window).resize( function () { diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index d830b27..766bcc4 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -51,13 +51,15 @@ $(document).ready(function () { var scrollTop; if($(window).width() > 1023){ - sticky.addClass("fixed"); +// sticky.addClass("fixed"); page.css("padding-top", "53px"); // $(slideshow).css("margin-top", "20px"); } else if($(window).width() < 1023 && $(window).width() > 640){ - page.css("padding-top", "100px"); + sticky.removeClass("fixed"); + page.css("padding-top", "0px"); } else { - page.css("padding-top", "150px"); + page.css("padding-top", "0px"); + sticky.removeClass("fixed"); } $(window).resize( function () { diff --git a/style.css b/style.css index dd288c4..93cc3cc 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: Petoskey.Com Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for Petoskey.Com -Version: 1.0.0 +Version: 1.0.1 */ -- 2.17.1