PageSourceSearch

https://fistfulofbooks.com/wp-content/themes/shopkeeper/js/public/misc-product-card-animation.js?ver=10.4

js fistfulofbooks.com collected 2026-10-02 07:09:14 UTC 3,188 bytes, 124 lines download raw bytes

1jQuery(
2	
3	function($) {
4
5		"use strict";
6
7		let user_delay = 200;
8		
9		window.product_card_animation = function(action, delay) {
10
11			if (typeof action === "undefined" || action === null) {
12				action = '';
13			}
14			if (typeof delay === "undefined" || delay === null) {
15				delay = 200;
16			}
17
18			$( 'ul.products' ).addClass( 'js_animated' );
19
20			if (action == 'reset') {
21				$( 'ul.products.js_animated li.product' ).removeClass( 'visible animation_ready animated' );
22			}
23
24			$( 'ul.products.js_animated li.product:not(.visible)' ).each(
25				function() {
26					if ( $( this ).visible( true ) ) {
27						$( this ).addClass( 'visible' );
28					}
29				}
30			);
31
32			$( 'ul.products.js_animated li.product.visible:not(.animation_ready)' ).each(
33				function(i) {
34					$( this ).addClass( 'animation_ready' );
35					$( this ).delay( i * delay ).queue(
36						function(next) {
37							$( this ).addClass( 'animated' );
38							next();
39						}
40					);
41				}
42			);
43
44			$( 'ul.products.js_animated li.product.visible:first' ).prevAll().addClass( 'visible' ).addClass( 'animation_ready' ).addClass( 'animated' );
45
46		}
47
48		window.category_card_animation = function(action, delay) {
49
50			if (typeof action === "undefined" || action === null) {
51				action = '';
52			}
53			if (typeof delay === "undefined" || delay === null) {
54				delay = 200;
55			}
56
57			$( 'section.section-categories' ).addClass( 'js_animated' );
58
59			if (action == 'reset') {
60				$( 'section.section-categories.js_animated .category-grid-item' ).removeClass( 'visible animation_ready animated' );
61			}
62
63			$( 'section.section-categories.js_animated .category-grid-item:not(.visible)' ).each(
64				function() {
65					if ( $( this ).visible( true ) ) {
66						$( this ).addClass( 'visible' );
67					}
68				}
69			);
70
71			$( 'section.section-categories.js_animated .category-grid-item.visible:not(.animation_ready)' ).each(
72				function(i) {
73					$( this ).addClass( 'animation_ready' );
74					$( this ).delay( i * delay ).queue(
75						function(next) {
76							$( this ).addClass( 'animated' );
77							next();
78						}
79					);
80				}
81			);
82
83			$( 'section.section-categories.js_animated .category-grid-item.visible:first' ).prevAll().addClass( 'visible' ).addClass( 'animation_ready' ).addClass( 'animated' );
84
85		}
86
87		$( 'ul.products.js_animated' ).imagesLoaded(
88			function() {
89				product_card_animation(null, user_delay);
90			}
91		);
92
93		$( 'section.section-categories.js_animated' ).imagesLoaded(
94			function() {
95				category_card_animation(null, user_delay);
96			}
97		);
98
99		$( window ).on( 'resize',
100			function() {
101				gb_throttle( product_card_animation(null, user_delay), 300 );
102				gb_throttle( category_card_animation(null, user_delay), 300 );
103			}
104		);
105
106		$( window ).on( 'scroll',
107			function() {
108				gb_throttle( product_card_animation(null, user_delay), 300 );
109				gb_throttle( category_card_animation(null, user_delay), 300 );
110			}
111		);
112
113		$( document ).ajaxComplete(
114			function() {
115				$( 'ul.products.js_animated' ).imagesLoaded(
116					function() {
117						product_card_animation(null, user_delay);
118					}
119				);
120			}
121		);
122
123	}
124);

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.