/var/www/html/wp-content/themes/total-school/js/

OS : Linux

PHP Version : 7.4.33

Software : Apache/2.4.6 (CentOS) PHP/7.4.33

Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64/** * @package WordPress * @subpackage Total School * @version 1.0.0 * * Woocommerce Scripts * Created by CMSMasters * */ "use strict"; jQuery(document).ready(function () { setTimeout(function () { if ( jQuery('.cmsmasters_dynamic_cart .widget_shopping_cart_content > ul li').length != 0 && jQuery('.cmsmasters_dynamic_cart .widget_shopping_cart_content > ul li').hasClass('empty') != true ) { jQuery('.cmsmasters_dynamic_cart_wrap').css( { opacity : '1', display : 'block' } ); } }, 2000); cmsmasters_ajax_add_to_cart(); jQuery('.cmsmasters_add_to_cart_button').on('click', function () { jQuery('.cmsmasters_dynamic_cart_wrap').css( { opacity : '1', display : 'block' } ); } ); jQuery('body').on('added_to_cart', update_dynamic_cart); } ); var cmsmasters_added_product = {}; function cmsmasters_ajax_add_to_cart() { "use strict"; jQuery('.cmsmasters_add_to_cart_button').on('click', function() { var productInfo = jQuery(this).closest('.cmsmasters_product'), productAmount = productInfo.find('.price > .amount, .price > ins > .amount').text(), addedToCart = productInfo.find('.added_to_cart'), product = {}; product.name = productInfo.find('.cmsmasters_product_title a').text(); product.price = productAmount.replace(cmsmasters_woo_script.currency_symbol, ''); product.image = productInfo.find('.cmsmasters_product_img img'); addedToCart.addClass('cmsmasters_to_show'); if (product.image.length) { /* Dynamic Cart Update Img Src */ var str = product.image.get(0).src, ext = /(\..{3,4})$/i.exec(str), extLength = ext[1].length, url = str.slice(0, -extLength), newURL = /(-\d{2,}x\d{2,})$/i.exec(url), newSize = '-' + cmsmasters_woo_script.thumbnail_image_width + 'x' + cmsmasters_woo_script.thumbnail_image_height, buildURL = ''; if (newURL !== null) { buildURL += url.slice(0, -newURL[1].length) + newSize + ext[1]; } else { buildURL += url + newSize + ext[1]; } product.image = ''; } cmsmasters_added_product = product; } ); } function update_dynamic_cart(event) { "use strict"; var product = jQuery.extend( { name : '', image : '' }, cmsmasters_added_product); if (typeof event != 'undefined') { var cart_button = jQuery('.cmsmasters_dynamic_cart .cmsmasters_dynamic_cart_button'), template = jQuery( '

' + product.image + '' + product.name + '' + '
' ); jQuery(event.currentTarget).find('a.cmsmasters_to_show').removeClass('cmsmasters_to_show').addClass('cmsmasters_visible'); template.appendTo('.cmsmasters_dynamic_cart').css('visibility', 'visible').animate( { marginTop : '20px', opacity : 1 }, 500); template.on('mouseenter cmsmasters_hide', function () { template.animate( { marginTop : 0, opacity : 0 }, 500, function () { template.remove(); } ); } ); setTimeout(function () { template.trigger('cmsmasters_hide'); }, 2000); } } jQuery(document).ready(function() { "use strict"; (function ($) { $('.touch .cmsmasters_product .cmsmasters_product_img').on('click', function() { $('*:not(this)').removeClass('cmsmasters_mobile_hover'); $(this).addClass('cmsmasters_mobile_hover'); } ); } )(jQuery); } );