]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fixes #7534, now has a single $element.trigger() at the end of the replace method
authorChris Oyler <chris@zurb.com>
Wed, 23 Dec 2015 21:19:38 +0000 (13:19 -0800)
committerChris Oyler <chris@zurb.com>
Wed, 23 Dec 2015 21:19:38 +0000 (13:19 -0800)
js/foundation.interchange.js

index b75131a8f9a53187fa46cbbd973fca717fbdf26d..dc96638831d0afb262b9da00370f0763f3ae174c 100644 (file)
@@ -60,7 +60,7 @@
    * @private
    */
   Interchange.prototype._events = function() {
-    $(window).on('resize.fndtn.interchange', Foundation.util.throttle(this._reflow.bind(this), 50));
+    $(window).on('resize.zf.interchange', Foundation.util.throttle(this._reflow.bind(this), 50));
   };
 
   /**
     // Replacing images
     if (this.$element[0].nodeName === 'IMG') {
       this.$element.attr('src', path).load(function() {
-        _this.$element.trigger('replaced.zf.interchange');
         _this.currentPath = path;
       });
     }
       $.get(path, function(response) {
         _this.$element.html(response);
         $(response).foundation();
-        _this.$element.trigger('replaced.zf.interchange');
         _this.currentPath = path;
       });
     }
+    this.$element.trigger('replaced.zf.interchange');
   };
   /**
    * Destroys an instance of interchange.