]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
feat: add zfPluginBase attr to provide access to real instance
authorSassNinja <kai.falkowski@gmail.com>
Wed, 6 Nov 2019 13:36:41 +0000 (14:36 +0100)
committerSassNinja <kai.falkowski@gmail.com>
Wed, 6 Nov 2019 13:36:41 +0000 (14:36 +0100)
Since this special plugin overrides zfPlugin (by design) the new zfPluginBase provides the (only) possiblity to access the real ReponsiveAccordionTabs instance if not having called the contructor yourself.

js/foundation.responsiveAccordionTabs.js

index 0233d9f89bea171492b6eb4b30f3bccdb410a2e1..0828b4b697e7dd7e42e80bbe001e79e738de87a7 100644 (file)
@@ -51,6 +51,7 @@ class ResponsiveAccordionTabs extends Plugin{
    */
   _setup(element, options) {
     this.$element = $(element);
+    this.$element.data('zfPluginBase');
     this.options = $.extend({}, ResponsiveAccordionTabs.defaults, this.$element.data(), options);
 
     this.rules = this.$element.data('responsive-accordion-tabs');