this.$element = element;
this.options = $.extend({}, Abide.defaults, this.$element.data(), options);
+ this.className = 'Abide'; // ie9 back compat
this._init();
}
this.$element = element;
this.options = $.extend({}, Accordion.defaults, this.$element.data(), options);
+ this.className = 'Accordion'; // ie9 back compat
this._init();
Keyboard.register('Accordion', {
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, AccordionMenu.defaults, this.$element.data(), options);
+ this.className = 'AccordionMenu'; // ie9 back compat
Nest.Feather(this.$element, 'accordion');
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, Drilldown.defaults, this.$element.data(), options);
+ this.className = 'Drilldown'; // ie9 back compat
Nest.Feather(this.$element, 'drilldown');
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, Dropdown.defaults, this.$element.data(), options);
+ this.className = 'Dropdown'; // ie9 back compat
// Triggers init is idempotent, just need to make sure it is initialized
Triggers.init($);
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, DropdownMenu.defaults, this.$element.data(), options);
+ this.className = 'DropdownMenu'; // ie9 back compat
Nest.Feather(this.$element, 'dropdown');
this._init();
_setup(element, options){
this.$element = element;
this.options = $.extend({}, Equalizer.defaults, this.$element.data(), options);
+ this.className = 'Equalizer'; // ie9 back compat
this._init();
}
this.options = $.extend({}, Interchange.defaults, options);
this.rules = [];
this.currentPath = '';
+ this.className = 'Interchange'; // ie9 back compat
this._init();
this._events();
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, Magellan.defaults, this.$element.data(), options);
+ this.className = 'Magellan'; // ie9 back compat
this._init();
this.calcPoints();
* @param {Object} options - Overrides to the default plugin settings.
*/
_setup(element, options) {
+ this.className = 'OffCanvas'; // ie9 back compat
this.$element = element;
this.options = $.extend({}, OffCanvas.defaults, this.$element.data(), options);
this.contentClasses = { base: [], reveal: [] };
var id = this.$element.attr('id');
this.$element.attr('aria-hidden', 'true');
-
+
// Find off-canvas content, either by ID (if specified), by siblings or by closest selector (fallback)
if (this.options.contentId) {
this.$content = $('#'+this.options.contentId);
.find('[data-open="'+id+'"], [data-close="'+id+'"], [data-toggle="'+id+'"]')
.attr('aria-expanded', 'false')
.attr('aria-controls', id);
-
+
// Get position by checking for related CSS class
this.position = this.$element.is('.position-left, .position-top, .position-right, .position-bottom') ? this.$element.attr('class').match(/position\-(left|top|right|bottom)/)[1] : this.position;
this.$triggers.attr('aria-expanded', 'true');
this.$element.attr('aria-hidden', 'false')
.trigger('opened.zf.offcanvas');
-
+
this.$content.addClass('is-open-' + this.position);
// If `contentScroll` is set to false, add class and disable scrolling on touch devices.
contentOverlay: true,
/**
- * Target an off-canvas content container by ID that may be placed anywhere. If null the closest content container will be taken.
+ * Target an off-canvas content container by ID that may be placed anywhere. If null the closest content container will be taken.
* @option
* @type {?string}
* @default null
_setup(element, options){
this.$element = element;
this.options = $.extend({}, Orbit.defaults, this.$element.data(), options);
+ this.className = 'Orbit'; // ie9 back compat
Touch.init($); // Touch init is idempotent, we just need to make sure it's initialied.
constructor(element, options) {
this._setup(element, options);
- var pluginName = hyphenate(this.constructor.name);
+ var pluginName = getPluginName(this);
this.uuid = GetYoDigits(6, pluginName);
if(!this.$element.attr(`data-${pluginName}`)){ this.$element.attr(`data-${pluginName}`, this.uuid); }
return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
}
+function getPluginName(obj) {
+ if(typeof(obj.constructor.name) !== 'undefined') {
+ return hyphenate(obj.constructor.name);
+ } else {
+ return hyphenate(obj.className);
+ }
+}
+
export {Plugin};
this.rules = this.$element.data('responsive-accordion-tabs');
this.currentMq = null;
this.currentPlugin = null;
+ this.className = 'ResponsiveAccordionTabs'; // ie9 back compat
if (!this.$element.attr('id')) {
this.$element.attr('id',GetYoDigits(6, 'responsiveaccordiontabs'));
};
this.rules = this.$element.data('responsive-menu');
this.currentMq = null;
this.currentPlugin = null;
+ this.className = 'ResponsiveMenu'; // ie9 back compat
this._init();
this._events();
_setup(element, options) {
this.$element = $(element);
this.options = $.extend({}, ResponsiveToggle.defaults, this.$element.data(), options);
+ this.className = 'ResponsiveToggle'; // ie9 back compat
this._init();
this._events();
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, Reveal.defaults, this.$element.data(), options);
+ this.className = 'Reveal'; // ie9 back compat
this._init();
// Triggers init is idempotent, just need to make sure it is initialized
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, Slider.defaults, this.$element.data(), options);
+ this.className = 'Slider'; // ie9 back compat
// Touch and Triggers inits are idempotent, we just need to make sure it's initialied.
Touch.init($);
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, SmoothScroll.defaults, this.$element.data(), options);
+ this.className = 'SmoothScroll'; // ie9 back compat
this._init();
}
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, Sticky.defaults, this.$element.data(), options);
+ this.className = 'Sticky'; // ie9 back compat
// Triggers init is idempotent, just need to make sure it is initialized
Triggers.init($);
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, Tabs.defaults, this.$element.data(), options);
+ this.className = 'Tabs'; // ie9 back compat
this._init();
Keyboard.register('Tabs', {
this.$element = element;
this.options = $.extend({}, Toggler.defaults, element.data(), options);
this.className = '';
+ this.className = 'Toggler'; // ie9 back compat
// Triggers init is idempotent, just need to make sure it is initialized
Triggers.init($);
_setup(element, options) {
this.$element = element;
this.options = $.extend({}, Tooltip.defaults, this.$element.data(), options);
+ this.className = 'Tooltip'; // ie9 back compat
this.isActive = false;
this.isClick = false;