PageSourceSearch

https://atthelakemagazine.com/wp-content/themes/simplemag/woocommerce/js/ti-woocommerce.js?ver=1.0

js atthelakemagazine.com collected 2026-09-26 06:19:03 UTC 3,304 bytes, 127 lines download raw bytes

1( function( $, window, document, undefined ) {
2
3	'use strict';
4
5	$(function() {
6
7	});
8
9
10    $(function() {
11
12        var slider = $('.product-page-slider'),
13            thumbs = $('.product-slider-thumbs');
14
15        slider.slick({
16            fade:true,
17            dots:true,
18            autoplay:false,
19            adaptiveHeight:true,
20            prevArrow:'<a heref="#" class="slider-nav-arrow prev-arrow"></a>',
21            nextArrow:'<a heref="#" class="slider-nav-arrow next-arrow"></a>',
22            asNavFor:thumbs
23        });
24
25        thumbs.slick({
26            slidesToShow:3,
27            slidesToScroll:1,
28            centerMode:true,
29            centerPadding:0,
30            focusOnSelect:true,
31            arrows:false,
32            asNavFor:slider
33        });
34
35        slider.find('.slick-dots').each(function() {
36            var slider_image_count = $(this).children().length;
37            $(this).append( '<li class="slider-image-count">' + slider_image_count + '</li>');
38        });
39
40        $('.variations').on('change', 'select', function() {
41            slider.slick( "slickGoTo", 0 );
42
43        });
44
45    });
46
47	$("input.qty:not(.product-quantity input.qty)").each(function () {
48		var min = parseFloat($(this).attr('min'));
49		if (min && min > 0 && parseFloat($(this).val()) < min) {
50			$(this).val(min);
51		}
52	});
53
54	$(document).on('click', '.plus, .minus', function () {
55
56		var $qty = $(this).closest('.quantity').find(".qty");
57		var currentVal = parseFloat($qty.val());
58		var max = parseFloat($qty.attr('max'));
59		var min = parseFloat($qty.attr('min'));
60		var step = $qty.attr('step');
61
62	   if ( $qty.val() == 0 && $(this).is('.minus') ) {
63		   return;
64	   }
65
66		if (!currentVal || currentVal == "" || currentVal == "NaN") currentVal = 0;
67		if (max == "" || max == "NaN") max = '';
68		if (min == "" || min == "NaN") min = 0;
69		if (step == 'any' || step == "" || step == undefined || parseFloat(step) == "NaN") step = 1;
70
71		if ($(this).is('.plus')) {
72			if ( max && currentVal  >= max ) {
73				$qty.val(max);
74			} else {
75				currentVal++;
76				$qty.val(currentVal);
77			}
78		} else {
79			if (min && (min == currentVal || currentVal < min)) {
80				$qty.val(min);
81			} else if (currentVal > 0) {
82				currentVal--;
83				$qty.val(currentVal);
84			}
85		}
86
87		$qty.trigger('change');
88	});
89
90
91	$.fn.disableNumberButtons = function () {
92		var value = parseFloat($(this).val());
93
94		var minus = this.prev();
95		var minAttr = this.attr('min');
96		var min = (minAttr) ? minAttr : 0;
97
98		(value > min ) ? minus.removeClass('is-disabled') : minus.addClass('is-disabled');
99
100		var plus = this.next();
101		var maxAttr = this.attr('max');
102		var max = (maxAttr) ? maxAttr : 999;
103		( value < max ) ? plus.removeClass('is-disabled') : plus.addClass('is-disabled');
104
105		if ( value <  min ) {
106		   $(this).val(min);
107		}
108	}
109
110	$('input.qty').each(function () {
111		$(this).disableNumberButtons();
112	});
113
114	$('input.qty').change(function () {
115		$(this).disableNumberButtons();
116	});
117
118	$("form.cart").on("change", "input.qty", function() {
119        $(this.form).find("button[data-quantity]").data("quantity", this.value);
120    });
121
122    $('.sticky-product-details .variations').on('change', 'select', function() {
123		$('html, body').animate({scrollTop: $('.single-product-columns').offset().top}, 700);
124    });
125
126
127})( jQuery, window, document );

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.