this._init();
this._events();
- /**
- * Fires when the plugin has been successfuly initialized.
- * @event Abide#init
- */
- this.$element.trigger('init.zf.abide');
+ Foundation.registerPlugin(this);
}
/**
$form.find('[data-abide-error]').css('display', 'none');
$(':input', $form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr(invalidAttr);
};
+ Abide.prototype.destroy = function(){
+ //TODO this...
+ };
Foundation.plugin(Abide);
this.options = $.extend({}, Accordion.defaults, this.$element.data(), options);
this._init();
- /**
- * Fires when the plugin has been successfuly initialized.
- * @event Accordion#init
- */
+
Foundation.registerPlugin(this);
Foundation.Keyboard.register('Accordion', {
'ENTER': 'toggle',
this.$element.find('[data-tab-content]').slideUp(0).css('display', '');
this.$element.find('a').off('.zf.accordion');
- /**
- * Fires when the plugin has been destroyed.
- * @event Accordion#destroyed
- */
- // this.$element.trigger('destroyed.zf.accordion');
Foundation.unregisterPlugin(this);
};
this._init();
-
- /**
- * Fires when the plugin has been successfuly initialized.
- * @event AccordionMenu#init
- */
- // this.$element.trigger('init.zf.accordionMenu');
Foundation.registerPlugin(this);
Foundation.Keyboard.register('AccordionMenu', {
'ENTER': 'toggle',
this.$element.find('[data-submenu]').slideDown(0).css('display', '');
this.$element.find('a').off('click.zf.accordionMenu');
- /**
- * Fires when the plugin has been destroyed.
- * @event AccordionMenu#destroy
- */
- // this.$element.trigger('destroyed.zf.accordionMenu');
Foundation.Nest.Burn(this.$element, 'accordion');
Foundation.unregisterPlugin(this);
};
this._events();
Foundation.registerPlugin(this);
- // /**
- // * Fires when the plugin has been successfuly initialized.
- // * @event Equalizer#init
- // */
- // this.$element.trigger('init.zf.equalizer');
}
/**
*/
Interchange.prototype.destroy = function(){
//TODO this.
- }
+ };
Foundation.plugin(Interchange);
// Exports for AMD/Browserify
this._events();
Foundation.registerPlugin(this);
- // /**
- // * Fires when the plugin has been successfuly initialized.
- // * @event ResponsiveMenu#init
- // */
- // this.$element.trigger('init.zf.ResponsiveMenu');
}
ResponsiveMenu.defaults = {};
ResponsiveMenu.prototype.destroy = function() {
this.currentPlugin.destroy();
$(window).off('.zf.ResponsiveMenu');
+ Foundation.unregisterPlugin(this);
};
Foundation.plugin(ResponsiveMenu);
this._events();
Foundation.registerPlugin(this);
- // /**
- // * Fires when the plugin has been successfully initialized.
- // * @event ResponsiveToggle#init
- // */
- // this.$element.trigger('init.zf.ResponsiveToggle');
}
ResponsiveToggle.defaults = {
* @example 'medium'
*/
hideFor: 'medium'
-}
+};
/**
* Initializes the tab bar by finding the target element, toggling element, and running update().
this.$toggler = this.$element.find('[data-toggle]');
this._update();
-}
+};
/**
* Adds necessary event handlers for the tab bar to work.
$(window).on('changed.zf.mediaquery', this._update.bind(this));
this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));
-}
+};
/**
* Checks the current media query to determine if the tab bar should be visible or hidden.
this.$element.hide();
this.$targetMenu.show();
}
-}
+};
/**
* Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it.
*/
this.$element.trigger('toggled.zf.responsiveToggle');
}
-}
-
+};
+ResponsiveToggle.prototype.destroy = function(){
+ //TODO this...
+};
Foundation.plugin(ResponsiveToggle);
-}(jQuery, Foundation)
+}(jQuery, Foundation);
// 'TAB': 'next',
// 'SHIFT_TAB': 'previous'
});
- // /**
- // * Fires when the plugin has been successfuly initialized.
- // * @event Tabs#init
- // */
- // this.$element.trigger('init.zf.tabs');
}
Tabs.defaults = {
$(window).off('changed.zf.mediaquery');
}
Foundation.unregisterPlugin(this);
- // /**
- // * Fires when the plugin has been destroyed.
- // * @event Tabs#destroyed
- // */
- // this.$element.trigger('destroyed.zf.tabs');
};
Foundation.plugin(Tabs);
this._events();
Foundation.registerPlugin(this);
- // /**
- // * Fires when the plugin has been successfuly initialized.
- // * @event Toggler#init
- // */
- // this.$element.trigger('init.zf.toggler');
}
Toggler.defaults = {
+ /**
+ * Tells the plugin if the element should animated when toggled.
+ * @option
+ * @example false
+ */
animate: false
};
*/
Toggler.prototype.destroy= function() {
this.$element.off('.zf.toggler');
+ Foundation.unregisterPlugin(this);
};
Foundation.plugin(Toggler);
this._init();
Foundation.registerPlugin(this);
-
- // /**
- // * Fires when the plugin has been successfully initialized
- // * @event Tooltip#init
- // */
- // this.$element.trigger('init.zf.tooltip');
}
Tooltip.defaults = {