From: Christian Seel Date: Fri, 7 Feb 2014 17:58:28 +0000 (+0100) Subject: replace .children('img') with .find('img') X-Git-Tag: v5.2.0~61^2~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4383%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git replace .children('img') with .find('img') Don't expect images to be direct children of the slide element item. An image could also have an `````` tag as wrapper. --- diff --git a/js/foundation/foundation.orbit.js b/js/foundation/foundation.orbit.js index 73f9f8f55..aff69baea 100644 --- a/js/foundation/foundation.orbit.js +++ b/js/foundation/foundation.orbit.js @@ -222,7 +222,7 @@ 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') @@ -283,8 +283,8 @@ $(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);