From: Phil Musser Date: Thu, 3 Dec 2015 17:51:29 +0000 (-0700) Subject: Fixed plugin 'double dip' in foundation.reflow.fn X-Git-Tag: v6.0.6~59^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=527dda80c973727b86f92acad52215be8d50c38b;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Fixed plugin 'double dip' in foundation.reflow.fn Checking for “double dip” on plugins should use the jQuery ‘data’ instead of ‘attr’ since ‘zf-plugin’ is set as a jQuery data key when the instance of the plugin on the element is created. --- diff --git a/js/foundation.core.js b/js/foundation.core.js index 6a8d6ce1e..0141272c7 100644 --- a/js/foundation.core.js +++ b/js/foundation.core.js @@ -168,7 +168,7 @@ var Foundation = { var $el = $(this), opts = {}; // Don't double-dip on plugins - if ($el.attr('zf-plugin')) { + if ($el.data('zf-plugin')) { console.warn("Tried to initialize "+name+" on an element that already has a Foundation plugin."); return; }