From 527dda80c973727b86f92acad52215be8d50c38b Mon Sep 17 00:00:00 2001 From: Phil Musser Date: Thu, 3 Dec 2015 10:51:29 -0700 Subject: [PATCH] Fixed plugin 'double dip' in foundation.reflow.fn MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- js/foundation.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.47.2