advanced-accordion.js
2 years ago
advanced-accordion.min.js
2 years ago
advanced-data-table.js
2 years ago
advanced-data-table.min.js
2 years ago
advanced-tabs.js
2 years ago
advanced-tabs.min.js
2 years ago
beehive-elements.js
3 years ago
beehive-elements.min.js
4 years ago
betterdocs-category-grid.js
3 years ago
betterdocs-category-grid.min.js
4 years ago
business-reviews.js
3 years ago
business-reviews.min.js
3 years ago
content-ticker.js
3 years ago
content-ticker.min.js
3 years ago
count-down.js
3 years ago
count-down.min.js
3 years ago
data-table.js
3 years ago
data-table.min.js
3 years ago
event-calendar.js
2 years ago
event-calendar.min.js
2 years ago
facebook-feed.js
2 years ago
facebook-feed.min.js
2 years ago
fancy-text.js
3 years ago
fancy-text.min.js
3 years ago
filterable-gallery.js
2 years ago
filterable-gallery.min.js
2 years ago
general.js
2 years ago
general.min.js
2 years ago
image-accordion.js
2 years ago
image-accordion.min.js
2 years ago
interactive-circle.js
2 years ago
interactive-circle.min.js
2 years ago
load-more.js
2 years ago
load-more.min.js
2 years ago
login-register.js
2 years ago
login-register.min.js
2 years ago
nft-gallery.js
3 years ago
nft-gallery.min.js
3 years ago
post-grid.js
3 years ago
post-grid.min.js
3 years ago
price-table.js
3 years ago
price-table.min.js
3 years ago
product-grid.js
3 years ago
product-grid.min.js
3 years ago
progress-bar.js
3 years ago
progress-bar.min.js
3 years ago
quick-view.js
2 years ago
quick-view.min.js
3 years ago
reading-progress.js
3 years ago
reading-progress.min.js
3 years ago
scroll-to-top.js
3 years ago
scroll-to-top.min.js
3 years ago
simple-menu.js
2 years ago
simple-menu.min.js
2 years ago
sticky-video.js
2 years ago
sticky-video.min.js
2 years ago
svg-draw.js
2 years ago
svg-draw.min.js
2 years ago
table-of-content.js
3 years ago
table-of-content.min.js
3 years ago
twitter-feed.js
2 years ago
twitter-feed.min.js
2 years ago
typeform.js
3 years ago
typeform.min.js
3 years ago
woo-cart.js
2 years ago
woo-cart.min.js
2 years ago
woo-checkout.js
2 years ago
woo-checkout.min.js
2 years ago
woo-product-carousel.js
3 years ago
woo-product-carousel.min.js
3 years ago
woo-product-gallery.js
3 years ago
woo-product-gallery.min.js
3 years ago
woo-product-list.js
2 years ago
woo-product-list.min.js
2 years ago
wrapper-link.js
3 years ago
wrapper-link.min.js
2 years ago
simple-menu.js
100 lines
| 1 | /******/ (function(modules) { // webpackBootstrap |
| 2 | /******/ // The module cache |
| 3 | /******/ var installedModules = {}; |
| 4 | /******/ |
| 5 | /******/ // The require function |
| 6 | /******/ function __webpack_require__(moduleId) { |
| 7 | /******/ |
| 8 | /******/ // Check if module is in cache |
| 9 | /******/ if(installedModules[moduleId]) { |
| 10 | /******/ return installedModules[moduleId].exports; |
| 11 | /******/ } |
| 12 | /******/ // Create a new module (and put it into the cache) |
| 13 | /******/ var module = installedModules[moduleId] = { |
| 14 | /******/ i: moduleId, |
| 15 | /******/ l: false, |
| 16 | /******/ exports: {} |
| 17 | /******/ }; |
| 18 | /******/ |
| 19 | /******/ // Execute the module function |
| 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
| 21 | /******/ |
| 22 | /******/ // Flag the module as loaded |
| 23 | /******/ module.l = true; |
| 24 | /******/ |
| 25 | /******/ // Return the exports of the module |
| 26 | /******/ return module.exports; |
| 27 | /******/ } |
| 28 | /******/ |
| 29 | /******/ |
| 30 | /******/ // expose the modules object (__webpack_modules__) |
| 31 | /******/ __webpack_require__.m = modules; |
| 32 | /******/ |
| 33 | /******/ // expose the module cache |
| 34 | /******/ __webpack_require__.c = installedModules; |
| 35 | /******/ |
| 36 | /******/ // define getter function for harmony exports |
| 37 | /******/ __webpack_require__.d = function(exports, name, getter) { |
| 38 | /******/ if(!__webpack_require__.o(exports, name)) { |
| 39 | /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); |
| 40 | /******/ } |
| 41 | /******/ }; |
| 42 | /******/ |
| 43 | /******/ // define __esModule on exports |
| 44 | /******/ __webpack_require__.r = function(exports) { |
| 45 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
| 46 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
| 47 | /******/ } |
| 48 | /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
| 49 | /******/ }; |
| 50 | /******/ |
| 51 | /******/ // create a fake namespace object |
| 52 | /******/ // mode & 1: value is a module id, require it |
| 53 | /******/ // mode & 2: merge all properties of value into the ns |
| 54 | /******/ // mode & 4: return value when already ns object |
| 55 | /******/ // mode & 8|1: behave like require |
| 56 | /******/ __webpack_require__.t = function(value, mode) { |
| 57 | /******/ if(mode & 1) value = __webpack_require__(value); |
| 58 | /******/ if(mode & 8) return value; |
| 59 | /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; |
| 60 | /******/ var ns = Object.create(null); |
| 61 | /******/ __webpack_require__.r(ns); |
| 62 | /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); |
| 63 | /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); |
| 64 | /******/ return ns; |
| 65 | /******/ }; |
| 66 | /******/ |
| 67 | /******/ // getDefaultExport function for compatibility with non-harmony modules |
| 68 | /******/ __webpack_require__.n = function(module) { |
| 69 | /******/ var getter = module && module.__esModule ? |
| 70 | /******/ function getDefault() { return module['default']; } : |
| 71 | /******/ function getModuleExports() { return module; }; |
| 72 | /******/ __webpack_require__.d(getter, 'a', getter); |
| 73 | /******/ return getter; |
| 74 | /******/ }; |
| 75 | /******/ |
| 76 | /******/ // Object.prototype.hasOwnProperty.call |
| 77 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
| 78 | /******/ |
| 79 | /******/ // __webpack_public_path__ |
| 80 | /******/ __webpack_require__.p = ""; |
| 81 | /******/ |
| 82 | /******/ |
| 83 | /******/ // Load entry module and return exports |
| 84 | /******/ return __webpack_require__(__webpack_require__.s = "./src/js/view/simple-menu.js"); |
| 85 | /******/ }) |
| 86 | /************************************************************************/ |
| 87 | /******/ ({ |
| 88 | |
| 89 | /***/ "./src/js/view/simple-menu.js": |
| 90 | /*!************************************!*\ |
| 91 | !*** ./src/js/view/simple-menu.js ***! |
| 92 | \************************************/ |
| 93 | /*! no static exports found */ |
| 94 | /***/ (function(module, exports) { |
| 95 | |
| 96 | eval("var SimpleMenu = function SimpleMenu($scope, $) {\n var $indicator_class = $('.eael-simple-menu-container', $scope).data('indicator-class');\n var $hamburger_icon = $('.eael-simple-menu-container', $scope).data('hamburger-icon');\n var $indicator_icon = $('.eael-simple-menu-container', $scope).data('indicator');\n var $dropdown_indicator_icon = $('.eael-simple-menu-container', $scope).data('dropdown-indicator');\n var $dropdown_indicator_class = $('.eael-simple-menu-container', $scope).data('dropdown-indicator-class');\n var $horizontal = $('.eael-simple-menu', $scope).hasClass('eael-simple-menu-horizontal');\n var $hamburger_breakpoints = $('.eael-simple-menu-container', $scope).data('hamburger-breakpoints');\n var $hamburger_device = $('.eael-simple-menu-container', $scope).data('hamburger-device');\n if (typeof $hamburger_device === 'undefined' || $hamburger_device === '' || $hamburger_device === null) {\n $hamburger_device = 'tablet';\n }\n var selectorByType = $horizontal ? '.eael-simple-menu-horizontal' : '.eael-simple-menu-vertical';\n var $hamburger_max_width = getHamburgerMaxWidth($hamburger_breakpoints, $hamburger_device);\n var $fullWidth = $('.eael-simple-menu--stretch'),\n all_ids = [];\n\n // add menu active class\n $('.eael-simple-menu li a', $scope).each(function () {\n var $this = $(this),\n hashURL = $this.attr('href'),\n thisURL = hashURL,\n isStartWithHash,\n splitURL = thisURL !== undefined ? thisURL.split('#') : [];\n hashURL = hashURL === undefined ? '' : hashURL;\n isStartWithHash = hashURL.startsWith('#');\n if (hashURL !== '#' && splitURL.length > 1 && localize.page_permalink === splitURL[0] && splitURL[1]) {\n all_ids.push(splitURL[1]);\n }\n if (!isStartWithHash && localize.page_permalink === thisURL) {\n $this.addClass('eael-item-active');\n }\n });\n $(window).on('load resize scroll', function () {\n if (all_ids.length > 0) {\n $.each(all_ids, function (index, item) {\n if ($('#' + item).isInViewport()) {\n $('a[href=\"' + localize.page_permalink + '#' + item + '\"]', $scope).addClass('eael-menu-' + item + ' eael-item-active');\n } else {\n $('.eael-menu-' + item).removeClass('eael-menu-' + item + ' eael-item-active');\n }\n });\n }\n });\n if ($horizontal) {\n // insert indicator\n if ($indicator_icon == 'svg') {\n $('.eael-simple-menu > li.menu-item-has-children', $scope).each(function () {\n $('> a', $(this)).append('<span class=\"indicator-svg\">' + $indicator_class + '</span>');\n });\n } else {\n $('.eael-simple-menu > li.menu-item-has-children', $scope).each(function () {\n $('> a', $(this)).append('<span class=\"' + $indicator_class + '\"></span>');\n });\n }\n if ($dropdown_indicator_icon == 'svg') {\n $('.eael-simple-menu > li ul li.menu-item-has-children', $scope).each(function () {\n $('> a', $(this)).append('<span class=\"dropdown-indicator-svg\">' + $dropdown_indicator_class + '</span>');\n });\n } else {\n $('.eael-simple-menu > li ul li.menu-item-has-children', $scope).each(function () {\n $('> a', $(this)).append('<span class=\"' + $dropdown_indicator_class + '\"></span>');\n });\n }\n }\n\n // insert responsive menu toggle, text\n $(selectorByType, $scope).before('<span class=\"eael-simple-menu-toggle-text\"></span>').after('<button class=\"eael-simple-menu-toggle\">' + $hamburger_icon + '<span class=\"eael-simple-menu-toggle-text\"></span></button>');\n eael_menu_resize($hamburger_max_width);\n\n // responsive menu slide\n $('.eael-simple-menu-container', $scope).on('click', '.eael-simple-menu-toggle', function (e) {\n e.preventDefault();\n var $siblings = $(this).siblings('nav').children(selectorByType);\n $siblings.css('display') == 'none' ? $siblings.slideDown(300) : $siblings.slideUp(300);\n });\n\n // clear responsive props\n $(window).on('resize load', function () {\n eael_menu_resize($hamburger_max_width);\n });\n function eael_menu_resize() {\n var max_width_value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n if (window.matchMedia('(max-width: ' + max_width_value + 'px)').matches) {\n $('.eael-simple-menu-container', $scope).addClass('eael-simple-menu-hamburger');\n $(selectorByType, $scope).addClass('eael-simple-menu-responsive');\n $('.eael-simple-menu-toggle-text', $scope).text($('.eael-simple-menu-horizontal .current-menu-item a', $scope).eq(0).text());\n\n // Mobile Dropdown Breakpoints\n $('.eael-simple-menu-container', $scope).closest('.elementor-widget-eael-simple-menu').removeClass('eael-hamburger--not-responsive').addClass('eael-hamburger--responsive');\n if ($('.eael-simple-menu-container', $scope).hasClass('eael-simple-menu--stretch')) {\n var css = {};\n if (!$(selectorByType, $scope).parent().hasClass('eael-nav-menu-wrapper')) {\n $(selectorByType, $scope).wrap('<nav class=\"eael-nav-menu-wrapper\"></nav>');\n }\n var $navMenu = $(\".eael-simple-menu-container nav\", $scope);\n menu_size_reset($navMenu);\n css.width = parseFloat($('.elementor').width()) + 'px';\n css.left = -parseFloat($navMenu.offset().left) + 'px';\n css.position = 'absolute';\n $navMenu.css(css);\n } else {\n var _css = {};\n if (!$(selectorByType, $scope).parent().hasClass('eael-nav-menu-wrapper')) {\n $(selectorByType, $scope).wrap('<nav class=\"eael-nav-menu-wrapper\"></nav>');\n }\n var _$navMenu = $(\".eael-simple-menu-container nav\", $scope);\n menu_size_reset(_$navMenu);\n _css.width = '';\n _css.left = '';\n _css.position = 'inherit';\n _$navMenu.css(_css);\n }\n } else {\n $('.eael-simple-menu-container', $scope).removeClass('eael-simple-menu-hamburger');\n $(selectorByType, $scope).removeClass('eael-simple-menu-responsive');\n $(selectorByType + ', ' + selectorByType + ' ul', $scope).css('display', '');\n $(\".eael-simple-menu-container nav\", $scope).removeAttr('style');\n\n // Mobile Dropdown Breakpoints\n $('.eael-simple-menu-container', $scope).closest('.elementor-widget-eael-simple-menu').removeClass('eael-hamburger--responsive').addClass('eael-hamburger--not-responsive');\n }\n }\n function menu_size_reset(selector) {\n var css = {};\n css.width = '';\n css.left = '';\n css.position = 'inherit';\n selector.css(css);\n }\n function getHamburgerMaxWidth($breakpoints, $device) {\n var $max_width = 0;\n if ($device === 'none' || typeof $device === 'undefined' || $device === '' || $device === null) {\n return $max_width;\n }\n for (var $key in $breakpoints) {\n if ($key == $device) {\n $max_width = $breakpoints[$key];\n }\n }\n // fetch max width value from string like 'Mobile (> 767px)' to 767\n $max_width = $max_width.replace(/[^0-9]/g, '');\n return $max_width;\n }\n $('.eael-simple-menu > li.menu-item-has-children', $scope).each(function () {\n // indicator position\n\n if ($indicator_icon == 'svg') {\n var $height = parseInt($('a', this).css('line-height')) / 2;\n $(this).append('<span class=\"eael-simple-menu-indicator\"> ' + $indicator_class + '</span>');\n } else {\n var $height = parseInt($('a', this).css('line-height')) / 2;\n $(this).append('<span class=\"eael-simple-menu-indicator ' + $indicator_class + '\"></span>');\n }\n\n // if current, keep indicator open\n // $(this).hasClass('current-menu-ancestor') ? $(this).addClass('eael-simple-menu-indicator-open') : ''\n });\n\n $('.eael-simple-menu > li ul li.menu-item-has-children', $scope).each(function (e) {\n // indicator position\n if ($dropdown_indicator_icon == 'svg') {\n var $height = parseInt($('a', this).css('line-height')) / 2;\n $(this).append('<span class=\"eael-simple-menu-indicator\"> ' + $dropdown_indicator_class + '</span>');\n } else {\n var $height = parseInt($('a', this).css('line-height')) / 2;\n $(this).append('<span class=\"eael-simple-menu-indicator ' + $dropdown_indicator_class + '\"></span>');\n }\n\n // if current, keep indicator open\n // $(this).hasClass('current-menu-ancestor') ? $(this).addClass('eael-simple-menu-indicator-open') : ''\n });\n\n // menu indent\n $('.eael-simple-menu-dropdown-align-left .eael-simple-menu-vertical li.menu-item-has-children').each(function () {\n var $padding_left = parseInt($('a', $(this)).css('padding-left'));\n $('ul li a', this).css({\n 'padding-left': $padding_left + 20 + 'px'\n });\n });\n $('.eael-simple-menu-dropdown-align-right .eael-simple-menu-vertical li.menu-item-has-children').each(function () {\n var $padding_right = parseInt($('a', $(this)).css('padding-right'));\n $('ul li a', this).css({\n 'padding-right': $padding_right + 20 + 'px'\n });\n });\n\n // main menu toggle\n $('.eael-simple-menu-container', $scope).on('click', '.eael-simple-menu-responsive li a:not([href=\"#\"])', function (e) {\n $(this).parents(selectorByType).slideUp(300);\n });\n $('.eael-simple-menu', $scope).on('click', 'a[href=\"#\"]', function (e) {\n e.preventDefault();\n $(this).siblings('.eael-simple-menu-indicator').click();\n });\n\n // menu dropdown toggle\n $('.eael-simple-menu', $scope).on('click', '.eael-simple-menu-indicator', function (e) {\n e.preventDefault();\n $(this).toggleClass('eael-simple-menu-indicator-open');\n $(this).hasClass('eael-simple-menu-indicator-open') ? $(this).siblings('ul').slideDown(300) : $(this).siblings('ul').slideUp(300);\n $('.eael-simple-menu-indicator-open').not($(this).parents('.menu-item-has-children').children('span')).removeClass('eael-simple-menu-indicator-open').siblings('ul').slideUp(300);\n });\n if (elementorFrontend.isEditMode()) {\n elementor.channels.editor.on('change', function (view) {\n var changed = view.elementSettingsModel.changed;\n if (changed.eael_simple_menu_dropdown) {\n elementor.saver.update.apply().then(function () {\n elementor.reloadPreview();\n });\n\n // let updated_max_width = getHamburgerMaxWidth( $hamburger_breakpoints, changed.eael_simple_menu_dropdown );\n // eael_menu_resize( updated_max_width );\n\n // $hamburger_max_width = updated_max_width;\n }\n });\n }\n};\n\njQuery(window).on('elementor/frontend/init', function () {\n if (ea.elementStatusCheck('eaelSimpleMenu')) {\n return false;\n }\n elementorFrontend.hooks.addAction('frontend/element_ready/eael-simple-menu.default', SimpleMenu);\n});\n\n//# sourceURL=webpack:///./src/js/view/simple-menu.js?"); |
| 97 | |
| 98 | /***/ }) |
| 99 | |
| 100 | /******/ }); |