only adding margin to the ad rotate slider after scrolling which is when the fixed...
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 3 Aug 2016 20:24:46 +0000 (16:24 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 3 Aug 2016 20:24:46 +0000 (16:24 -0400)
css/app.css
js/app.js
js/custom/pageSetup.js
scss/_slideshow.scss

index 6929413..8982425 100644 (file)
@@ -6624,8 +6624,7 @@ main {
 
 @media only screen and (max-width: 40em) {
   #slideshow {
-    height: 270px;
-    margin-top: 140px; } }
+    height: 270px; } }
 #slideshow li {
   list-style: none; }
   @media only screen and (min-width:40.063em) and (max-width:64em) {
index 143d26e..572921e 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -50,13 +50,16 @@ $(document).ready(function () {
             this.title = $(this.element).find('img').attr('alt');
         }
     });
+    var slideshow = $("#slideshow");
     var body = $("body");
     var sticky = $(".sticky");
     $(window).on("scroll", function () {
         var scrollTop = $(window).scrollTop();
         if(scrollTop > 0){
             $(sticky).addClass("fixed");
+            $(slideshow).css("margin-top", "140px");
         } 
+        
 //        if(scrollTop == 0){
 //            $(sticky).removeClass("fixed");
 //            $(body).removeClass("f-topbar-fixed");
index de49c62..62215c7 100644 (file)
@@ -41,13 +41,16 @@ $(document).ready(function () {
             this.title = $(this.element).find('img').attr('alt');
         }
     });
+    var slideshow = $("#slideshow");
     var body = $("body");
     var sticky = $(".sticky");
     $(window).on("scroll", function () {
         var scrollTop = $(window).scrollTop();
         if(scrollTop > 0){
             $(sticky).addClass("fixed");
+            $(slideshow).css("margin-top", "140px");
         } 
+        
 //        if(scrollTop == 0){
 //            $(sticky).removeClass("fixed");
 //            $(body).removeClass("f-topbar-fixed");
index eaacdd3..c445b54 100644 (file)
@@ -1,7 +1,6 @@
 #slideshow {
     @media #{$small-only}{
         height: 270px;
-        margin-top: 140px;
     }
     li {
         list-style: none;