Файловый менеджер - Редактировать - /home/neurocs/www/wp-content/themes/mediclinic/framework/modules/woocommerce/assets/js/woocommerce.js
Назад
(function($) { 'use strict'; var woocommerce = {}; mkdf.modules.woocommerce = woocommerce; woocommerce.mkdfOnDocumentReady = mkdfOnDocumentReady; woocommerce.mkdfOnWindowLoad = mkdfOnWindowLoad; woocommerce.mkdfOnWindowResize = mkdfOnWindowResize; woocommerce.mkdfOnWindowScroll = mkdfOnWindowScroll; $(document).ready(mkdfOnDocumentReady); $(window).on('load', mkdfOnWindowLoad); $(window).resize(mkdfOnWindowResize); $(window).scroll(mkdfOnWindowScroll); /* All functions to be called on $(document).ready() should be in this function */ function mkdfOnDocumentReady() { mkdfInitQuantityButtons(); mkdfInitSelect2(); mkdfPaginationClass(); mkdfInitSingleProductLightbox(); } /* All functions to be called on $(window).load() should be in this function */ function mkdfOnWindowLoad() { } /* All functions to be called on $(window).resize() should be in this function */ function mkdfOnWindowResize() { } /* All functions to be called on $(window).scroll() should be in this function */ function mkdfOnWindowScroll() {} /* ** Init quantity buttons to increase/decrease products for cart */ function mkdfInitQuantityButtons() { $(document).on( 'click', '.mkdf-quantity-minus, .mkdf-quantity-plus', function(e) { e.stopPropagation(); var button = $(this), inputField = button.siblings('.mkdf-quantity-input'), step = parseFloat(inputField.data('step')), max = parseFloat(inputField.data('max')), minus = false, inputValue = parseFloat(inputField.val()), newInputValue; if (button.hasClass('mkdf-quantity-minus')) { minus = true; } if (minus) { newInputValue = inputValue - step; if (newInputValue >= 1) { inputField.val(newInputValue); } else { inputField.val(0); } } else { newInputValue = inputValue + step; if ( max === undefined ) { inputField.val(newInputValue); } else { if ( newInputValue >= max ) { inputField.val(max); } else { inputField.val(newInputValue); } } } inputField.trigger( 'change' ); }); } /* ** Init select2 script for select html dropdowns */ function mkdfInitSelect2() { var orderByDropDown = $('.woocommerce-ordering .orderby'); if (orderByDropDown.length) { orderByDropDown.select2({ minimumResultsForSearch: Infinity }); } var shippingCountryCalc = $('#calc_shipping_country'); if(shippingCountryCalc.length) { shippingCountryCalc.select2(); } var shippingStateCalc = $('.cart-collaterals .shipping select#calc_shipping_state'); if(shippingStateCalc.length) { shippingStateCalc.select2(); } } /* ** Init Product Single Pretty Photo attributes */ function mkdfInitSingleProductLightbox() { var item = $('.mkdf-woo-single-page .mkdf-single-product-content .woocommerce-product-gallery__image'); if(item.length) { item.each(function() { var thisItem = $(this).children('a'); thisItem.attr('data-rel', 'prettyPhoto[woo_single_pretty_photo]'); if (typeof mkdf.modules.common.mkdfPrettyPhoto === "function") { mkdf.modules.common.mkdfPrettyPhoto(); } }); } } /* ** Add current class for pagination */ function mkdfPaginationClass() { var pagination = $('.woocommerce-pagination .page-numbers'); if (pagination.length){ pagination.find('li span.current').parent().addClass('current'); } } })(jQuery);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка