Server IP : 192.64.112.168 / Your IP : 18.216.92.5 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.woocommerceComments = function() { var hash = window.location.hash; var url = window.location.href; if (hash.toLowerCase().indexOf('comment-') >= 0 || hash === '#reviews' || hash === '#tab-reviews' || url.indexOf('comment-page-') > 0 || url.indexOf('cpage=') > 0 || hash === '#tab-wd_additional_tab' || hash === '#tab-wd_custom_tab') { setTimeout(function() { window.scrollTo(0, 0); }, 1); // When reviews separate section need open first tab. if ( $('.single-product-page').hasClass('reviews-location-separate') && ( hash === '#reviews' || hash === '#tab-reviews' || hash.toLowerCase().indexOf('comment-') >= 0 || url.indexOf('comment-page-') > 0 || url.indexOf('cpage=') > 0 ) ) { woodmartThemeModule.$body.find('.wc-tabs, ul.tabs').first().find('li:first a').click(); } setTimeout(function() { if ($(hash).length > 0) { var $link = $('.woocommerce-tabs a[href=' + hash + ']'); if ( $link.length ) { $link.trigger('click'); } setTimeout(function() { $('html, body').stop().animate({ scrollTop: $(hash).offset().top - woodmart_settings.ajax_scroll_offset }, 400); }, 400); } }, 10); } $('.wd-builder-on .woocommerce-review-link').on('click', function () { var $tabReviews = $('.wd-single-tabs .wd-accordion .wd-accordion-title.tab-title-reviews'); if ( !$tabReviews.length ) { return; } $tabReviews.trigger('click'); setTimeout(function() { $('html, body').stop().animate({ scrollTop: $tabReviews.offset().top - woodmart_settings.ajax_scroll_offset }, 400); }, 400); }); }; $(document).ready(function() { woodmartThemeModule.woocommerceComments(); }); })(jQuery);