Server IP : 192.64.112.168 / Your IP : 18.119.137.162 Web Server : Apache System : Linux nc-ph-2300-85.bluforrest.com 4.18.0-513.9.1.el8_9.x86_64 #1 SMP Sat Dec 2 05:23:44 EST 2023 x86_64 User : expressoneac ( 1128) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/expressoneac/www/wp-content/themes/woodmart/js/scripts/wc/ |
Upload File : |
/* global woodmart_settings */ (function($) { woodmartThemeModule.$document.on('wdBackHistory wdShopPageInit', function () { woodmartThemeModule.categoriesAccordion(); }); woodmartThemeModule.categoriesAccordion = function() { if (woodmart_settings.categories_toggle === 'no') { return; } var $widget = $('.widget_product_categories'), $list = $widget.find('.product-categories'), time = 300; $list.find('.cat-parent').each(function() { var $this = $(this); if ($this.find(' > .wd-cats-toggle').length > 0) { return; } if ($this.find(' > .children').length === 0 || $this.find(' > .children > *').length === 0) { return; } $this.append('<div class="wd-cats-toggle"></div>'); }); $list.on('click', '.wd-cats-toggle', function() { var $btn = $(this), $subList = $btn.prev(); if ($subList.hasClass('list-shown')) { $btn.removeClass('toggle-active'); $subList.stop().slideUp(time).removeClass('list-shown'); } else { $subList.parent().parent().find('> li > .list-shown').slideUp().removeClass('list-shown'); $subList.parent().parent().find('> li > .toggle-active').removeClass('toggle-active'); $btn.addClass('toggle-active'); $subList.stop().slideDown(time).addClass('list-shown'); } }); if ($list.find('li.current-cat.cat-parent, li.current-cat-parent').length > 0) { $list.find('li.current-cat.cat-parent, li.current-cat-parent').find('> .wd-cats-toggle').trigger('click'); } }; $(document).ready(function() { woodmartThemeModule.categoriesAccordion(); }); })(jQuery);