]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
active first li element no working in firefox 5289/head
authorme-kell <github@obiecta.com>
Sat, 7 Jun 2014 13:36:48 +0000 (15:36 +0200)
committerme-kell <github@obiecta.com>
Sat, 7 Jun 2014 13:36:48 +0000 (15:36 +0200)
In firefox the slide is not showing when first li is marked with class="active".
If none of the li elements is marked or other than the first, everything works as expected.
Do removeClass('active') and self._goto($init_target.index()) only if idx != $init_target.index()

js/foundation/foundation.orbit.js

index 9aec4cd439a1b6b0cd805ad4037fcac3aef25a8d..f9aa0366a25b81a6d61def892500852dfa101058 100644 (file)
         var $init_target = slides_container.find("." + settings.active_slide_class),
             animation_speed = settings.animation_speed;
         settings.animation_speed = 1;
-        $init_target.removeClass('active');
-        self._goto($init_target.index());
+        if (idx != $init_target.index()) {
+            $init_target.removeClass('active');
+            self._goto($init_target.index());
+        }
         settings.animation_speed = animation_speed;
       }