]> _ Git - fluidbook-v3.git/commitdiff
done #646 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 1 Sep 2016 16:08:02 +0000 (16:08 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 1 Sep 2016 16:08:02 +0000 (16:08 +0000)
js/410-features.js

index 24c363e3d5807358dd4909ffeeaf1329b744a1e6..a774c17f58af8a6e655c39e4d993ce48eb153ee7 100644 (file)
@@ -9,12 +9,6 @@ function load_features() {
         cubeitresize(); // Needed so video is sized correctly in popup
     });
 
-    $(".feature-blocks").masonry({
-        itemSelector: ".feature-block",
-        columnWidth: ".small-rectangle-tall",
-        transitionDuration: 0,
-    });
-
 }
 
 function resizeFeaturePage() {
@@ -43,6 +37,16 @@ function resizeFeatureVideoLink() {
 // evenly divided by the number of columns. This stops
 // Masonry from having gaps and mis-aligned items
 function resizeFeatureBlocks() {
+
+    try{
+        $(".feature-blocks").masonry('destroy');
+    }
+    $(".feature-blocks").masonry({
+        itemSelector: ".feature-block",
+        columnWidth: ".small-rectangle-tall",
+        transitionDuration: 0,
+    });
+
     // Container width is 90% of the window
     var ww = $(window).width(),
         break2cols = 1350,