PageSourceSearch

https://www.churchandschoolfurniture.net/wp-content/themes/churcha…/assets/js/custom-page/template-products.js

js churchandschoolfurniture.net collected 2026-10-06 14:17:11 UTC 4,354 bytes, 128 lines download raw bytes

1(function ($, w, d, h, b) {
2
3    var app = {
4
5        initRange: function () {
6            var $rangeslider = $('#listings-price'),
7                $minPrice = $('.selected-min-price'),
8                $maxPrice = $('.selected-max-price');
9
10            if( $rangeslider.length){
11                $rangeslider.ionRangeSlider({
12                    type: 'double',
13                    min: 0,
14                    max: 340,
15                    hide_min_max: true,
16                    hide_from_to: true,
17                    onFinish: function () {
18    
19                    }
20                });
21                $rangeslider.on("change", function () {
22                    var $this = $(this),
23                        value = $this.prop("value").split(";");
24                    _minPrice = (value[0] < 1 ? value[0] : value[0] + '');
25                    _maxPrice = (value[1] < 1 ? value[1] : value[1] + '');
26                    $minPrice.text('$ ' + _minPrice);
27                    $maxPrice.text('$ ' + _maxPrice);
28    
29                    _maxPrice = (parseInt(_maxPrice) * 1000000);
30                    _minPrice = (parseInt(_minPrice) * 1000000);
31                    $('.min-price-class').val(_minPrice);
32                    $('.max-price-class').val(_maxPrice);
33                });
34            }
35
36            
37
38        },
39
40        initFilter: function () {
41            // Filters
42            jQuery('.ip-filt-btns button').click(function(){
43                jQuery(this).remove();
44            })
45
46            jQuery('.ip-filt-clear button').click(function(){
47                jQuery('.ip-filt-btns button').remove();
48            })
49
50            // Collections
51
52            jQuery('.ip-filter-collections-list > li ').click(function(){
53                jQuery(this).toggleClass('active');
54            })
55
56            jQuery('.ip-filter-collections-sublist > li > a ').click(function(){
57                jQuery(this).parent().addClass('active');
58            })
59
60
61        },
62
63        initProductHover: function() {
64
65            jQuery('.ip-pl-list-main-inner').on('mouseover touchstart', '.new-prod-item-inner',function() {
66                jQuery(this).find('.new-prod-cart').css('opacity', 1);
67            });
68            jQuery('.ip-pl-list-main-inner').on('mouseout touchend', '.new-prod-item-inner',function() {
69                jQuery(this).find('.new-prod-cart').css('opacity', 0);
70            });
71
72            jQuery('.ip-pl-list-main-inner').on('mouseover touchstart', '.new-prod-item-inner a:has(.img-wrapper)',function() {
73                jQuery(this).find('.new-prod-img-hover').css('opacity', 1);
74               
75            });
76            jQuery('.ip-pl-list-main-inner').on('mouseout touchend', '.new-prod-item-inner a:has(.img-wrapper)',function() {
77                jQuery(this).find('.new-prod-img-hover').css('opacity', 0);
78                
79            });
80
81        },
82
83        moveProductColor: function() {
84            jQuery('<div>', {
85                class: 'new-prod-item-colors',
86            }).appendTo('.new-prod-item .new-prod-item-details a.woocommerce-LoopProduct-link');
87            
88
89            jQuery('.new-prod-item').each(function(){
90                var _this = jQuery(this)
91                _this.find('.cfvsw_variations_form').appendTo(_this.find('.new-prod-item-colors'))
92            })
93
94        },
95
96        changeIconGridListView: function() {
97            var homeUrl = window.location.origin;
98            var gridIcon = '<img width="22" height="22" src="' + homeUrl + '/wp-content/uploads/2023/11/grid-icon.png" alt="Grid">';
99            var listIcon = '<img width="22" height="22" src="' + homeUrl + '/wp-content/uploads/2023/11/list-icon.png" alt="List">';
100
101            jQuery('.widget_berocket_lgv_widget .berocket_lgv_button.berocket_lgv_button_grid').html(gridIcon);
102            jQuery('.widget_berocket_lgv_widget .berocket_lgv_button.berocket_lgv_button_list').html(listIcon);
103        },
104
105    }
106
107
108    jQuery(document).ready(function () {
109
110        app.initRange();
111
112        app.initFilter();
113
114        app.initProductHover();
115
116        app.moveProductColor();
117
118        app.changeIconGridListView();
119        jQuery('.wc-block-checkout__actions_row .wc-block-components-button__text').text('Place Quote Request');
120    });
121
122    jQuery(window).on('load', function () {
123
124
125    })
126
127
128}
128)(jQuery, window, document, 'html', 'body');

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.