From: Nicolas Coden Date: Wed, 11 Apr 2018 21:01:22 +0000 (+0200) Subject: fix: remove position reset of Orbit slides preventing the "full-absolute" new behavior X-Git-Tag: v6.6.0~3^2~239^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7daaba50c;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: remove position reset of Orbit slides preventing the "full-absolute" new behavior All Orbit slides should always have an `absolute` positioning to prevent jumping Orbit slider (see #11107). The `'position': 'relative'` reset is no longer necessary here and break the Orbit behavior as inline styles overrides `.orbit-slide` class styles. See: * https://github.com/zurb/foundation-sites/pull/11107/commits/dbdae96312bcccd0820d8ee43c088d5d6a1fab14 * https://github.com/zurb/foundation-sites/pull/11107 --- diff --git a/js/foundation.orbit.js b/js/foundation.orbit.js index 8901c6b4e..41ef15f27 100644 --- a/js/foundation.orbit.js +++ b/js/foundation.orbit.js @@ -149,8 +149,9 @@ class Orbit extends Plugin { temp = this.getBoundingClientRect().height; $(this).attr('data-slide', counter); - 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'}); + // hide all slides but the active one + if (!/mui/g.test($(this)[0].className) && _this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) { + $(this).css({'display': 'none'}); } max = temp > max ? temp : max; counter++;