]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Added check in orbit.js to make sure slides aren't animating before hiding them when...
authorDaniel Thompson <daniel.thompson@agencyq.com>
Thu, 16 Mar 2017 16:01:29 +0000 (12:01 -0400)
committerDaniel Thompson <daniel.thompson@agencyq.com>
Thu, 16 Mar 2017 16:01:29 +0000 (12:01 -0400)
js/foundation.orbit.js

index 4519efd4dcc57ca0710a77caa023452e406b70f4..5f9c70156a7bcc31ae35a27cee21774219dc4e51 100644 (file)
@@ -137,7 +137,7 @@ class Orbit {
       temp = this.getBoundingClientRect().height;
       $(this).attr('data-slide', counter);
 
-      if (_this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) {//if not the active slide, set css position and display property
+      if (!/mui/g.test($(this)[0].className) && _this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) {//if not the active slide, set css position and display property
         $(this).css({'position': 'relative', 'display': 'none'});
       }
       max = temp > max ? temp : max;
@@ -213,7 +213,7 @@ class Orbit {
         $controls.attr('tabindex', 0)
         //also need to handle enter/return and spacebar key presses
         .on('click.zf.orbit touchend.zf.orbit', function(e){
-         e.preventDefault();
+    e.preventDefault();
           _this.changeSlide($(this).hasClass(_this.options.nextClass));
         });
       }