From: Anthony Talarico Date: Wed, 3 Aug 2016 20:27:35 +0000 (-0400) Subject: adding conditions for window width checking to add specific amounts of margin for... X-Git-Tag: v1.0.0^2~24 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=4bac2cbbd119cb644c482f41f29d4db512838e42;p=WP-Themes%2Fpetoskey.git adding conditions for window width checking to add specific amounts of margin for small medium and large --- diff --git a/js/app.js b/js/app.js index 572921e..8af87d5 100644 --- a/js/app.js +++ b/js/app.js @@ -57,7 +57,11 @@ $(document).ready(function () { var scrollTop = $(window).scrollTop(); if(scrollTop > 0){ $(sticky).addClass("fixed"); - $(slideshow).css("margin-top", "140px"); + if(scrollTop > 319 && scrollTop < 641 ){ + $(slideshow).css("margin-top", "140px"); + } else if(scrollTop > 639 && scrollTop < 1025){ +// $(slideshow).css("margin-top", "140px"); + } } // if(scrollTop == 0){ diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 62215c7..69f4ffe 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -48,7 +48,11 @@ $(document).ready(function () { var scrollTop = $(window).scrollTop(); if(scrollTop > 0){ $(sticky).addClass("fixed"); - $(slideshow).css("margin-top", "140px"); + if(scrollTop > 319 && scrollTop < 641 ){ + $(slideshow).css("margin-top", "140px"); + } else if(scrollTop > 639 && scrollTop < 1025){ +// $(slideshow).css("margin-top", "140px"); + } } // if(scrollTop == 0){