]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
addBack(‘*’) will always add the parent element to $elem and then the 7466/head
authorEvan Lask <evanl@criticalmass.com>
Wed, 9 Dec 2015 18:53:59 +0000 (11:53 -0700)
committerEvan Lask <evanl@criticalmass.com>
Wed, 9 Dec 2015 18:53:59 +0000 (11:53 -0700)
first plugin in the list gets initialized upon it (typically abide).

it should be filtered for the plugin that is being initialized

js/foundation.core.js

index 754ba3a519da6d9968872829964c92a1aedb5f06..bed377a5317ec2a0beb71d42c58b4a127d98a307 100644 (file)
@@ -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() {