1(function($) { 2 "use strict"; 3 4 $(".wpb_category_n_menu_accordion").each(function(){ 5 6 var accordion = $(this).data('accordion'), 7 indicator_icon = $(this).data('indicator_icon'), 8 iconclass = $(this).data('iconclass'), 9 caretHtml = ''; 10 11 if( iconclass ){ 12 caretHtml = '<i class="'+iconclass+'"></i>'; 13 }else{ 14 caretHtml = indicator_icon; 15 } 16 17 $(this).find('.wpb_category_n_menu_accordion_list').navgoco({ 18 caretHtml: caretHtml, 19 accordion: accordion, 20 openClass: 'wpb-submenu-indicator-minus', 21 save: true, 22 cookie: { 23 name: 'navgoco', 24 expires: false, 25 path: '/' 26 }, 27 slide: { 28 duration: 400, 29 easing: 'swing' 30 } 31 }); 32 33 }); 34 35 36 37 /** 38 * Accordion init on Elementor Editor 39 * @param $scope The Widget wrapper element as a jQuery element 40 * @param $ The jQuery alias 41 */ 42 43 var WPB_Accordion_Menu_Elementor = function( $scope, $test ) { 44 45 var $_accordion_wrapper = $scope.find(".wpb_category_n_menu_accordion"); 46 47 $_accordion_wrapper.each(function(){ 48 49 var accordion = $(this).data('accordion'), 50 indicator_icon = $(this).data('indicator_icon'), 51 iconclass = $(this).data('iconclass'), 52 caretHtml = ''; 53 54 if( iconclass ){ 55 caretHtml = '<i class="'+iconclass+'"></i>'; 56 }else{ 57 caretHtml = indicator_icon; 58 } 59 60 $(this).find('.wpb_category_n_menu_accordion_list').navgoco({ 61 caretHtml: caretHtml, 62 accordion: accordion, 63 openClass: 'wpb-submenu-indicator-minus', 64 save: true, 65 cookie: { 66 name: 'navgoco', 67 expires: false, 68 path: '/' 69 }, 70 slide: { 71 duration: 400, 72 easing: 'swing' 73 } 74 }); 75 76 }); 77 78 }; 79 80 // Run this code under Elementor. 81 $( window ).on( 'elementor/frontend/init', function() { 82 elementorFrontend.hooks.addAction( 'frontend/element_ready/wpb-accordion-categories.default', WPB_Accordion_Menu_Elementor ); 83 elementorFrontend.hooks.addAction( 'frontend/element_ready/wpb-accordion-menu.default', WPB_Accordion_Menu_Elementor ); 84 elementorFrontend.hooks.addAction( 'frontend/element_ready/wpb-accordion-menu-or-category-pro.default', WPB_Accordion_Menu_Elementor ); 85 }); 86 87}(jQuery));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.