]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
replace .children('img') with .find('img') 4383/head
authorChristian Seel <cs@chsmedien.de>
Fri, 7 Feb 2014 17:58:28 +0000 (18:58 +0100)
committerChristian Seel <cs@chsmedien.de>
Fri, 7 Feb 2014 17:58:28 +0000 (18:58 +0100)
Don't expect images to be direct children of the slide element item. An image could also have an ```<a>``` tag as wrapper.

js/foundation/foundation.orbit.js

index 73f9f8f55abf71951aaeadab9b9db856f6ba5922..aff69baeaee37711d35d427e40a979c20e34e487 100644 (file)
       self.build_markup();
       if (settings.timer) {
         timer = self.create_timer();
-        Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
+        Foundation.utils.image_loaded(this.slides().find('img'), timer.start);
       }
       animate = new FadeAnimation(settings, slides_container);
       if (settings.animation === 'slide')
 
       $(document).on('click', '[data-orbit-link]', self.link_custom);
       $(window).on('resize', self.compute_dimensions);
-      Foundation.utils.image_loaded(this.slides().children('img'), self.compute_dimensions);
-      Foundation.utils.image_loaded(this.slides().children('img'), function() {
+      Foundation.utils.image_loaded(this.slides().find('img'), self.compute_dimensions);
+      Foundation.utils.image_loaded(this.slides().find('img'), function() {
         container.prev('.preloader').css('display', 'none');
         self.update_slide_number(0);
         self.update_active_link(0);