UNPKG

28 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory(require("./foundation.accordion"), require("./foundation.core"), require("./foundation.tabs"), require("./foundation.util.mediaQuery"), require("jquery"));
4 else if(typeof define === 'function' && define.amd)
5 define(["./foundation.accordion", "./foundation.core", "./foundation.tabs", "./foundation.util.mediaQuery", "jquery"], factory);
6 else if(typeof exports === 'object')
7 exports["foundation.responsiveAccordionTabs"] = factory(require("./foundation.accordion"), require("./foundation.core"), require("./foundation.tabs"), require("./foundation.util.mediaQuery"), require("jquery"));
8 else
9 root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.responsiveAccordionTabs"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.accordion"], root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.tabs"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["jQuery"]);
10})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_accordion__, __WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_tabs__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
47/******/ __webpack_require__.d = function(exports, name, getter) {
48/******/ if(!__webpack_require__.o(exports, name)) {
49/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50/******/ }
51/******/ };
52/******/
53/******/ // define __esModule on exports
54/******/ __webpack_require__.r = function(exports) {
55/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57/******/ }
58/******/ Object.defineProperty(exports, '__esModule', { value: true });
59/******/ };
60/******/
61/******/ // create a fake namespace object
62/******/ // mode & 1: value is a module id, require it
63/******/ // mode & 2: merge all properties of value into the ns
64/******/ // mode & 4: return value when already ns object
65/******/ // mode & 8|1: behave like require
66/******/ __webpack_require__.t = function(value, mode) {
67/******/ if(mode & 1) value = __webpack_require__(value);
68/******/ if(mode & 8) return value;
69/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70/******/ var ns = Object.create(null);
71/******/ __webpack_require__.r(ns);
72/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74/******/ return ns;
75/******/ };
76/******/
77/******/ // getDefaultExport function for compatibility with non-harmony modules
78/******/ __webpack_require__.n = function(module) {
79/******/ var getter = module && module.__esModule ?
80/******/ function getDefault() { return module['default']; } :
81/******/ function getModuleExports() { return module; };
82/******/ __webpack_require__.d(getter, 'a', getter);
83/******/ return getter;
84/******/ };
85/******/
86/******/ // Object.prototype.hasOwnProperty.call
87/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88/******/
89/******/ // __webpack_public_path__
90/******/ __webpack_require__.p = "";
91/******/
92/******/
93/******/ // Load entry module and return exports
94/******/ return __webpack_require__(__webpack_require__.s = 11);
95/******/ })
96/************************************************************************/
97/******/ ({
98
99/***/ "./foundation.accordion":
100/*!************************************************************************************************************************************************************************************!*\
101 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.accordion"],"amd":"./foundation.accordion","commonjs":"./foundation.accordion","commonjs2":"./foundation.accordion"} ***!
102 \************************************************************************************************************************************************************************************/
103/*! no static exports found */
104/***/ (function(module, exports) {
105
106module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_accordion__;
107
108/***/ }),
109
110/***/ "./foundation.core":
111/*!****************************************************************************************************************************************************************!*\
112 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
113 \****************************************************************************************************************************************************************/
114/*! no static exports found */
115/***/ (function(module, exports) {
116
117module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
118
119/***/ }),
120
121/***/ "./foundation.tabs":
122/*!****************************************************************************************************************************************************************!*\
123 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.tabs"],"amd":"./foundation.tabs","commonjs":"./foundation.tabs","commonjs2":"./foundation.tabs"} ***!
124 \****************************************************************************************************************************************************************/
125/*! no static exports found */
126/***/ (function(module, exports) {
127
128module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_tabs__;
129
130/***/ }),
131
132/***/ "./foundation.util.mediaQuery":
133/*!************************************************************************************************************************************************************************************************************!*\
134 !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.mediaQuery"],"amd":"./foundation.util.mediaQuery","commonjs":"./foundation.util.mediaQuery","commonjs2":"./foundation.util.mediaQuery"} ***!
135 \************************************************************************************************************************************************************************************************************/
136/*! no static exports found */
137/***/ (function(module, exports) {
138
139module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;
140
141/***/ }),
142
143/***/ "./js/entries/plugins/foundation.responsiveAccordionTabs.js":
144/*!******************************************************************!*\
145 !*** ./js/entries/plugins/foundation.responsiveAccordionTabs.js ***!
146 \******************************************************************/
147/*! exports provided: Foundation, ResponsiveAccordionTabs */
148/***/ (function(module, __webpack_exports__, __webpack_require__) {
149
150"use strict";
151__webpack_require__.r(__webpack_exports__);
152/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
153/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
154/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
155
156/* harmony import */ var _foundation_responsiveAccordionTabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.responsiveAccordionTabs */ "./js/foundation.responsiveAccordionTabs.js");
157/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResponsiveAccordionTabs", function() { return _foundation_responsiveAccordionTabs__WEBPACK_IMPORTED_MODULE_1__["ResponsiveAccordionTabs"]; });
158
159
160
161_foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_responsiveAccordionTabs__WEBPACK_IMPORTED_MODULE_1__["ResponsiveAccordionTabs"], 'ResponsiveAccordionTabs');
162
163
164/***/ }),
165
166/***/ "./js/foundation.responsiveAccordionTabs.js":
167/*!**************************************************!*\
168 !*** ./js/foundation.responsiveAccordionTabs.js ***!
169 \**************************************************/
170/*! exports provided: ResponsiveAccordionTabs */
171/***/ (function(module, __webpack_exports__, __webpack_require__) {
172
173"use strict";
174__webpack_require__.r(__webpack_exports__);
175/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsiveAccordionTabs", function() { return ResponsiveAccordionTabs; });
176/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
177/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
178/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./foundation.util.mediaQuery");
179/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__);
180/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core");
181/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__);
182/* harmony import */ var _foundation_accordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.accordion */ "./foundation.accordion");
183/* harmony import */ var _foundation_accordion__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_foundation_accordion__WEBPACK_IMPORTED_MODULE_3__);
184/* harmony import */ var _foundation_tabs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.tabs */ "./foundation.tabs");
185/* harmony import */ var _foundation_tabs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_foundation_tabs__WEBPACK_IMPORTED_MODULE_4__);
186
187
188function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
189
190function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
191
192function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
193
194function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
195
196function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
197
198function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
199
200function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
201
202function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
203
204function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
205
206
207
208
209
210
211 // The plugin matches the plugin classes with these plugin instances.
212
213var MenuPlugins = {
214 tabs: {
215 cssClass: 'tabs',
216 plugin: _foundation_tabs__WEBPACK_IMPORTED_MODULE_4__["Tabs"],
217 open: function open(plugin, target) {
218 return plugin.selectTab(target);
219 },
220 close: null
221 /* not supported */
222 ,
223 toggle: null
224 /* not supported */
225
226 },
227 accordion: {
228 cssClass: 'accordion',
229 plugin: _foundation_accordion__WEBPACK_IMPORTED_MODULE_3__["Accordion"],
230 open: function open(plugin, target) {
231 return plugin.down(jquery__WEBPACK_IMPORTED_MODULE_0___default()(target));
232 },
233 close: function close(plugin, target) {
234 return plugin.up(jquery__WEBPACK_IMPORTED_MODULE_0___default()(target));
235 },
236 toggle: function toggle(plugin, target) {
237 return plugin.toggle(jquery__WEBPACK_IMPORTED_MODULE_0___default()(target));
238 }
239 }
240};
241/**
242 * ResponsiveAccordionTabs module.
243 * @module foundation.responsiveAccordionTabs
244 * @requires foundation.util.motion
245 * @requires foundation.accordion
246 * @requires foundation.tabs
247 */
248
249var ResponsiveAccordionTabs =
250/*#__PURE__*/
251function (_Plugin) {
252 _inherits(ResponsiveAccordionTabs, _Plugin);
253
254 function ResponsiveAccordionTabs(element, options) {
255 var _this2;
256
257 _classCallCheck(this, ResponsiveAccordionTabs);
258
259 _this2 = _possibleConstructorReturn(this, _getPrototypeOf(ResponsiveAccordionTabs).call(this, element, options));
260 return _possibleConstructorReturn(_this2, _this2.options.reflow && _this2.storezfData || _assertThisInitialized(_this2));
261 }
262 /**
263 * Creates a new instance of a responsive accordion tabs.
264 * @class
265 * @name ResponsiveAccordionTabs
266 * @fires ResponsiveAccordionTabs#init
267 * @param {jQuery} element - jQuery object to make into Responsive Accordion Tabs.
268 * @param {Object} options - Overrides to the default plugin settings.
269 */
270
271
272 _createClass(ResponsiveAccordionTabs, [{
273 key: "_setup",
274 value: function _setup(element, options) {
275 this.$element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element);
276 this.$element.data('zfPluginBase', this);
277 this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, ResponsiveAccordionTabs.defaults, this.$element.data(), options);
278 this.rules = this.$element.data('responsive-accordion-tabs');
279 this.currentMq = null;
280 this.currentRule = null;
281 this.currentPlugin = null;
282 this.className = 'ResponsiveAccordionTabs'; // ie9 back compat
283
284 if (!this.$element.attr('id')) {
285 this.$element.attr('id', Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'responsiveaccordiontabs'));
286 }
287
288 this._init();
289
290 this._events();
291 }
292 /**
293 * Initializes the Menu by parsing the classes from the 'data-responsive-accordion-tabs' attribute on the element.
294 * @function
295 * @private
296 */
297
298 }, {
299 key: "_init",
300 value: function _init() {
301 _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]._init(); // The first time an Interchange plugin is initialized, this.rules is converted from a string of "classes" to an object of rules
302
303
304 if (typeof this.rules === 'string') {
305 var rulesTree = {}; // Parse rules from "classes" pulled from data attribute
306
307 var rules = this.rules.split(' '); // Iterate through every rule found
308
309 for (var i = 0; i < rules.length; i++) {
310 var rule = rules[i].split('-');
311 var ruleSize = rule.length > 1 ? rule[0] : 'small';
312 var rulePlugin = rule.length > 1 ? rule[1] : rule[0];
313
314 if (MenuPlugins[rulePlugin] !== null) {
315 rulesTree[ruleSize] = MenuPlugins[rulePlugin];
316 }
317 }
318
319 this.rules = rulesTree;
320 }
321
322 this._getAllOptions();
323
324 if (!jquery__WEBPACK_IMPORTED_MODULE_0___default.a.isEmptyObject(this.rules)) {
325 this._checkMediaQueries();
326 }
327 }
328 }, {
329 key: "_getAllOptions",
330 value: function _getAllOptions() {
331 //get all defaults and options
332 var _this = this;
333
334 _this.allOptions = {};
335
336 for (var key in MenuPlugins) {
337 if (MenuPlugins.hasOwnProperty(key)) {
338 var obj = MenuPlugins[key];
339
340 try {
341 var dummyPlugin = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<ul></ul>');
342 var tmpPlugin = new obj.plugin(dummyPlugin, _this.options);
343
344 for (var keyKey in tmpPlugin.options) {
345 if (tmpPlugin.options.hasOwnProperty(keyKey) && keyKey !== 'zfPlugin') {
346 var objObj = tmpPlugin.options[keyKey];
347 _this.allOptions[keyKey] = objObj;
348 }
349 }
350
351 tmpPlugin.destroy();
352 } catch (e) {}
353 }
354 }
355 }
356 /**
357 * Initializes events for the Menu.
358 * @function
359 * @private
360 */
361
362 }, {
363 key: "_events",
364 value: function _events() {
365 this._changedZfMediaQueryHandler = this._checkMediaQueries.bind(this);
366 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', this._changedZfMediaQueryHandler);
367 }
368 /**
369 * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.
370 * @function
371 * @private
372 */
373
374 }, {
375 key: "_checkMediaQueries",
376 value: function _checkMediaQueries() {
377 var matchedMq,
378 _this = this; // Iterate through each rule and find the last matching rule
379
380
381 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(this.rules, function (key) {
382 if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].atLeast(key)) {
383 matchedMq = key;
384 }
385 }); // No match? No dice
386
387 if (!matchedMq) return; // Plugin already initialized? We good
388
389 if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return; // Remove existing plugin-specific CSS classes
390
391 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(MenuPlugins, function (key, value) {
392 _this.$element.removeClass(value.cssClass);
393 }); // Add the CSS class for the new plugin
394
395 this.$element.addClass(this.rules[matchedMq].cssClass); // Create an instance of the new plugin
396
397 if (this.currentPlugin) {
398 //don't know why but on nested elements data zfPlugin get's lost
399 if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin', this.storezfData);
400 this.currentPlugin.destroy();
401 }
402
403 this._handleMarkup(this.rules[matchedMq].cssClass);
404
405 this.currentRule = this.rules[matchedMq];
406 this.currentPlugin = new this.currentRule.plugin(this.$element, this.options);
407 this.storezfData = this.currentPlugin.$element.data('zfPlugin');
408 }
409 }, {
410 key: "_handleMarkup",
411 value: function _handleMarkup(toSet) {
412 var _this = this,
413 fromString = 'accordion';
414
415 var $panels = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + this.$element.attr('id') + ']');
416 if ($panels.length) fromString = 'tabs';
417
418 if (fromString === toSet) {
419 return;
420 }
421
422 var tabsTitle = _this.allOptions.linkClass ? _this.allOptions.linkClass : 'tabs-title';
423 var tabsPanel = _this.allOptions.panelClass ? _this.allOptions.panelClass : 'tabs-panel';
424 this.$element.removeAttr('role');
425 var $liHeads = this.$element.children('.' + tabsTitle + ',[data-accordion-item]').removeClass(tabsTitle).removeClass('accordion-item').removeAttr('data-accordion-item');
426 var $liHeadsA = $liHeads.children('a').removeClass('accordion-title');
427
428 if (fromString === 'tabs') {
429 $panels = $panels.children('.' + tabsPanel).removeClass(tabsPanel).removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby');
430 $panels.children('a').removeAttr('role').removeAttr('aria-controls').removeAttr('aria-selected');
431 } else {
432 $panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content');
433 }
434
435 $panels.css({
436 display: '',
437 visibility: ''
438 });
439 $liHeads.css({
440 display: '',
441 visibility: ''
442 });
443
444 if (toSet === 'accordion') {
445 $panels.each(function (key, value) {
446 jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).appendTo($liHeads.get(key)).addClass('accordion-content').attr('data-tab-content', '').removeClass('is-active').css({
447 height: ''
448 });
449 jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + _this.$element.attr('id') + ']').after('<div id="tabs-placeholder-' + _this.$element.attr('id') + '"></div>').detach();
450 $liHeads.addClass('accordion-item').attr('data-accordion-item', '');
451 $liHeadsA.addClass('accordion-title');
452 });
453 } else if (toSet === 'tabs') {
454 var $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + _this.$element.attr('id') + ']');
455 var $placeholder = jquery__WEBPACK_IMPORTED_MODULE_0___default()('#tabs-placeholder-' + _this.$element.attr('id'));
456
457 if ($placeholder.length) {
458 $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div class="tabs-content"></div>').insertAfter($placeholder).attr('data-tabs-content', _this.$element.attr('id'));
459 $placeholder.remove();
460 } else {
461 $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div class="tabs-content"></div>').insertAfter(_this.$element).attr('data-tabs-content', _this.$element.attr('id'));
462 }
463
464 $panels.each(function (key, value) {
465 var tempValue = jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).appendTo($tabsContent).addClass(tabsPanel);
466 var hash = $liHeadsA.get(key).hash.slice(1);
467 var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id') || Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'accordion');
468
469 if (hash !== id) {
470 if (hash !== '') {
471 jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id', hash);
472 } else {
473 hash = id;
474 jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id', hash);
475 jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeadsA.get(key)).attr('href', jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeadsA.get(key)).attr('href').replace('#', '') + '#' + hash);
476 }
477 }
478
479 var isActive = jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeads.get(key)).hasClass('is-active');
480
481 if (isActive) {
482 tempValue.addClass('is-active');
483 }
484 });
485 $liHeads.addClass(tabsTitle);
486 }
487
488 ;
489 }
490 /**
491 * Opens the plugin pane defined by `target`.
492 * @param {jQuery | String} target - jQuery object or string of the id of the pane to open.
493 * @see Accordion.down
494 * @see Tabs.selectTab
495 * @function
496 */
497
498 }, {
499 key: "open",
500 value: function open(_target) {
501 if (this.currentRule && typeof this.currentRule.open === 'function') {
502 var _this$currentRule;
503
504 return (_this$currentRule = this.currentRule).open.apply(_this$currentRule, [this.currentPlugin].concat(Array.prototype.slice.call(arguments)));
505 }
506 }
507 /**
508 * Closes the plugin pane defined by `target`. Not availaible for Tabs.
509 * @param {jQuery | String} target - jQuery object or string of the id of the pane to close.
510 * @see Accordion.up
511 * @function
512 */
513
514 }, {
515 key: "close",
516 value: function close(_target) {
517 if (this.currentRule && typeof this.currentRule.close === 'function') {
518 var _this$currentRule2;
519
520 return (_this$currentRule2 = this.currentRule).close.apply(_this$currentRule2, [this.currentPlugin].concat(Array.prototype.slice.call(arguments)));
521 }
522 }
523 /**
524 * Toggles the plugin pane defined by `target`. Not availaible for Tabs.
525 * @param {jQuery | String} target - jQuery object or string of the id of the pane to toggle.
526 * @see Accordion.toggle
527 * @function
528 */
529
530 }, {
531 key: "toggle",
532 value: function toggle(_target) {
533 if (this.currentRule && typeof this.currentRule.toggle === 'function') {
534 var _this$currentRule3;
535
536 return (_this$currentRule3 = this.currentRule).toggle.apply(_this$currentRule3, [this.currentPlugin].concat(Array.prototype.slice.call(arguments)));
537 }
538 }
539 /**
540 * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.
541 * @function
542 */
543
544 }, {
545 key: "_destroy",
546 value: function _destroy() {
547 if (this.currentPlugin) this.currentPlugin.destroy();
548 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('changed.zf.mediaquery', this._changedZfMediaQueryHandler);
549 }
550 }]);
551
552 return ResponsiveAccordionTabs;
553}(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__["Plugin"]);
554
555ResponsiveAccordionTabs.defaults = {};
556
557
558/***/ }),
559
560/***/ 11:
561/*!************************************************************************!*\
562 !*** multi ./js/entries/plugins/foundation.responsiveAccordionTabs.js ***!
563 \************************************************************************/
564/*! no static exports found */
565/***/ (function(module, exports, __webpack_require__) {
566
567module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.responsiveAccordionTabs.js */"./js/entries/plugins/foundation.responsiveAccordionTabs.js");
568
569
570/***/ }),
571
572/***/ "jquery":
573/*!********************************************************************************************!*\
574 !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
575 \********************************************************************************************/
576/*! no static exports found */
577/***/ (function(module, exports) {
578
579module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
580
581/***/ })
582
583/******/ });
584});
585//# sourceMappingURL=foundation.responsiveAccordionTabs.js.map
\No newline at end of file