From: Evan Lask Date: Wed, 9 Dec 2015 18:53:59 +0000 (-0700) Subject: addBack(‘*’) will always add the parent element to $elem and then the X-Git-Tag: v6.0.6~53^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7466%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git addBack(‘*’) will always add the parent element to $elem and then the first plugin in the list gets initialized upon it (typically abide). it should be filtered for the plugin that is being initialized --- diff --git a/js/foundation.core.js b/js/foundation.core.js index 754ba3a51..bed377a53 100644 --- a/js/foundation.core.js +++ b/js/foundation.core.js @@ -158,7 +158,7 @@ var Foundation = { var plugin = _this._plugins[name]; // Localize the search to all elements inside elem, as well as elem itself, unless elem === document - var $elem = $(elem).find('[data-'+name+']').addBack('*'); + var $elem = $(elem).find('[data-'+name+']').addBack('[data-'+name+']'); // For each plugin found, initialize it $elem.each(function() {