From: Chris Oyler Date: Wed, 23 Dec 2015 21:19:38 +0000 (-0800) Subject: fixes #7534, now has a single $element.trigger() at the end of the replace method X-Git-Tag: v6.1.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffb24f24365ab6e287c1169a743824bef0ad6e0e;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fixes #7534, now has a single $element.trigger() at the end of the replace method --- diff --git a/js/foundation.interchange.js b/js/foundation.interchange.js index b75131a8f..dc9663883 100644 --- a/js/foundation.interchange.js +++ b/js/foundation.interchange.js @@ -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)); }; /** @@ -147,7 +147,6 @@ // Replacing images if (this.$element[0].nodeName === 'IMG') { this.$element.attr('src', path).load(function() { - _this.$element.trigger('replaced.zf.interchange'); _this.currentPath = path; }); } @@ -160,10 +159,10 @@ $.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.