]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fire loaded event, even when image has already been loaded.
authorJordan Humphreys <jordan@mailyard.net>
Mon, 1 Apr 2013 23:50:09 +0000 (16:50 -0700)
committerJordan Humphreys <jordan@mailyard.net>
Mon, 1 Apr 2013 23:50:09 +0000 (16:50 -0700)
js/foundation/foundation.clearing.js

index 0918784e760cc8bccbfac4184f0a93eb365a71bd..9cf7c283645a2b1b12129eb313864f719d67abeb 100644 (file)
         return;
       }
 
-      if (this.complete || this.readyState === 4) {
+      if (image[0].complete || image.readyState === 4) {
         loaded();
       } else {
         bindLoad.call(image);
 
       // we use jQuery animate instead of CSS transitions because we
       // need a callback to unlock the next animation
-      if (target.index() !== old_index && !/skip/.test(direction)){
+      if (!/skip/.test(direction)){
         if (/left/.test(direction)) {
           this.lock();
           clearing.animate({left : left + width}, 300, this.unlock());