Jquery on footer after all
authorLaury GvR <laury@gaslightmedia.com>
Thu, 14 Apr 2016 21:32:15 +0000 (17:32 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 14 Apr 2016 21:32:15 +0000 (17:32 -0400)
footer.php

index 25cba3c..128d01b 100644 (file)
       </div><!--End of off-canvas-->
   <?php wp_footer();?>
   </body>
+  <?php if (is_front_page()) { ?>
+    <script>
+    $(document).foundation();
+    $(document).ready(function () {
+        'use strict';
+            $("#metaslider_14").nivoSlider({
+                pauseOnHover:true,
+                effect: 'slideInLeft',
+                directionNavHide:true,
+                pauseTime: 7000,
+                afterLoad: function (){
+        //            $("#metaslider_11 .nivo-caption").fadeIn();
+                   $("#metaslider_14 .nivo-caption").addClass("open");
+                },
+                beforeChange: function () {
+                   $("#metaslider_14 .nivo-caption").removeClass("open");
+                     $("#metaslider_14 .nivo-caption").addClass("close");
+                },
+               afterChange: function () {
+                   $("#metaslider_14 .nivo-caption").removeClass("close");
+                   $("#metaslider_14 .nivo-caption").addClass("open");
+               } 
+            });
+
+            // remove this code before final push
+            $("#metaslider_11").nivoSlider({
+                pauseOnHover:true,
+                directionNavHide:true,
+                effect: 'slideInLeft',
+                pauseTime: 7000,
+                afterLoad: function (){
+        //          $("#metaslider_11 .nivo-caption").fadeIn();
+                   $("#metaslider_11 .nivo-caption").addClass("open");
+                },
+                beforeChange: function () {
+                   $("#metaslider_11 .nivo-caption").removeClass("open");
+                     $("#metaslider_11 .nivo-caption").addClass("close");
+                },
+               afterChange: function () {
+                   $("#metaslider_11 .nivo-caption").removeClass("close");
+                   $("#metaslider_11 .nivo-caption").addClass("open");
+               } 
+            });
+    });
+    </script>
+  <?php } ?>
 </html>