From 4bac2cbbd119cb644c482f41f29d4db512838e42 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 3 Aug 2016 16:27:35 -0400 Subject: [PATCH] adding conditions for window width checking to add specific amounts of margin for small medium and large --- js/app.js | 6 +++++- js/custom/pageSetup.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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){ -- 2.17.1