PageSourceSearch

https://palacove-zahrady.cz/cache-buster-1698399558/static/js/shop.js

js palacove-zahrady.cz collected 2026-10-02 11:19:00 UTC 2,681 bytes, 86 lines download raw bytes

1$(function(){
2	//init cart form
3	$('#cart-form-wrapper').on('click', '.update-cart-count', function() {
4		var toInject = { 'act' : 'recalculate' };
5		var id = $(this).attr('data-id');
6		if (id) {
7			var count = $(this).attr('data-count');
8			toInject['count_'+id] = count;
9		}
10		$('#cartform').submitForm(toInject);
11	});
12	//init filter form
13	$('#category-filter-wrapper').on('change', 'form#filter input[type=checkbox]', function() {
14		$(this).closest('form').submit();
15	});
16
17	//init filter pagination
18	$('#category-product-list-wrapper').on('click', '.ajax-pagination a', function() {
19		var page = $(this).attr('data-page');
20		var data = {}
21		data['page'] = page;
22		$('#filter').submitForm(data);
23		$("html, body").animate({ scrollTop: 0 });
24	});
25
26	//init shipping switcher
27	$("#country").change(function() {
28		var country = $(this).val();
29		$(".country-shipping").hide();
30		$("#project-hints > p").hide();
31		var selectedBlock = $('div[data-country="'+country+'"]');
32		if (selectedBlock.length) {
33			selectedBlock.show();
34			$('input[name="shippingType'+country+'"]').change();
35		} else {
36			$('#abroad-shipping-notice').show();
37		}
38	});
39
40	$('input[name^="shippingType"]').change(function() {
41		if ($(this).is(':checked')) {
42			var country = $("#country").val();
43			var shippingType = $(this).val();
44			if ($('.payment-switcher[data-type="'+country+shippingType+'"]').length) {
45				$(".payment-switcher").hide();
46				$('.payment-switcher[data-type="'+country+shippingType+'"]').show();
47			}
48			$('input[name="paymentType'+country+shippingType+'"]').change();
49		}
50	});
51	$('input[name^="paymentType"]').change(function() {
52		if ($(this).is(':checked')) {
53			var paymentType = $(this).val();
54			var countryAndShipping = $(this).attr('name');
55			var price = $('#price_'+countryAndShipping+paymentType).attr('data-price');
56			var shippingPrice = $('#price_'+countryAndShipping+paymentType).attr('data-shipping-price');
57			$('#dynamic-price, #cart-summary').html(price);
58			$('#dynamic-shipping-price').html(shippingPrice);
59		}
60	});
61	$("#country").change();
62
63	//init cart delivery address trigger
64	$(function() {
65		$('#deliveryAddress').change(function() {		
66			if ( $(this).is(':checked') ) {
67				$('#delivery-address').slideDown().find('input,select').attr('disabled',false);
68			}
69			else {
70				$('#delivery-address').slideUp().find('input,select').attr('disabled',true);
71			}
72		});
73		$('#deliveryAddress').change();
74	});
75
76	//scroll to discount code input in case of an error msg
77	if ($('div.error #discountCode').length > 0) {
78		$('html,body').animate({
79			scrollTop: $('#discountCode').offset().top
80		}, 0);
81	}
82
83	//forward GPE WebPay request form 
84	//$("form#webpay").submit();
85
86});

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.