From: Anthony Talarico Date: Fri, 9 Jun 2017 12:20:48 +0000 (-0400) Subject: fixing the topbar jump effect on mobile and tablet X-Git-Tag: v1.0.1^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=760c12485c89210547a8507296f6a5bb7a1f7256;p=WP-Themes%2Fpetoskey.git 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 --- 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 */