PageSourceSearch

https://www.ccc-real-estate.com/wp-content/themes/hello-elementor-child/assets/js/search-filter.js?ver=7.1.2

js ccc-real-estate.com collected 2026-10-05 18:43:36 UTC 5,311 bytes, 174 lines download raw bytes

1/**jQuery(document).ready(function($) {
2    var initMultiselect = function () {
3        $selectItems = jQuery(".multiselect");
4        var $listingResetBtn = jQuery(".listings-search-reset");
5
6        function init () {
7            $selectItems.multipleSelect();
8           jQuery(".ms-select-all").find("span").text(search_form_lbl.select_unselect);
9        }
10
11        function setEventListingResetBtn () {
12            $listingResetBtn.on("click", function () {
13                $selectItems.multipleSelect('uncheckAll');
14
15                eraseCookie('options');
16                eraseCookie('locationValue');
17                eraseCookie('typeValue');
18                eraseCookie('featureValue');
19                eraseCookie('offerValue');
20                eraseCookie('priceValue');
21            });
22        }
23        if ($selectItems.length) init();
24        if ($listingResetBtn.length) setEventListingResetBtn();
25
26    };
27    initMultiselect();
28
29    var $pricesSelect = jQuery(".listing-search-prices");
30var $priceMin = jQuery(".listing-search-min");
31var $priceMax = jQuery(".listing-search-max");
32function setPricesOptions (curOffer = 'default') {
33            $pricesSelect.find("option").remove();
34
35            var curPricesData = pricesData.find(function (cur) {
36                return cur.offer === curOffer;
37            });
38
39
40            if (curPricesData.offer === "default") {
41                $pricesSelect.attr("disabled", "disabled");
42            } else {
43                $pricesSelect.removeAttr("disabled");
44            }
45
46            curPricesData.data.forEach(function (cur, index) {
47                var text = cur.min + cur.del + cur.max;
48                var tag = "<option value='" + index + "'>" + text + ' ' +" &euro;</option>";
49                $pricesSelect.append(tag)
50            });
51
52            setMinMaxPrice(curOffer,$pricesSelect.val());
53
54        }
55jQuery(document).on('change','input[name="offer"]',function(){
56    console.log(jQuery(this).val());
57    setPricesOptions(jQuery(this).val());
58});
59
60$pricesSelect.on("change", function () {
61    var curIndex = jQuery(this).val();
62    setMinMaxPrice(jQuery('input[name="offer"]:checked').val(),curIndex);
63});
64
65jQuery(window).load(function() {
66 setPricesOptions(jQuery('input[name="offer"]:checked').val());
67});
68
69
70function setMinMaxPrice(curOffer,index){
71
72    var curPricesData = pricesData.find(function (cur) {
73                return cur.offer === curOffer;
74            });
75
76            var minPrice = curPricesData.data[index].min.replace(/\./g, "");
77            var maxPrice = curPricesData.data[index].max.replace(/\./g, "");
78            $priceMin.attr("value", minPrice);
79
80            if (maxPrice.length) {
81                $priceMax.attr("name", "max");
82                $priceMax.attr("value", maxPrice);
83            }
84            else {
85                $priceMax.removeAttr("name");
86            }
87            
88}
89
90
91var pricesData = [
92            {
93                offer: 'default',
94                data: [
95                    {
96                        min: 'Please, select offer to see price ranges',
97                        del: "",
98                        max: ""
99                    }
100                ]
101            },
102            {
103                offer: 'rent',
104                data: [
105                    {
106                        min: "0",
107                        del: " - ",
108                        max: "1.000"
109                    },
110                    {
111                        min: "1.000",
112                        del: " - ",
113                        max: "2.500"
114                    },
115                    {
116                        min: "2.500",
117                        del: " - ",
118                        max: "4.000"
119                    },
120                    {
121                        min: "4.000",
122                        del: "+ ",
123                        max: ""
124                    }
125                ]
126            },
127            {
128                offer: 'sale',
129                data: [
130                    {
131                        min: "0",
132                        del: " - ",
133                        max: "250.000"
134                    },
135                    {
136                        min: "250.000",
137                        del: " - ",
138                        max: "500.000"
139                    },
140                    {
141                        min: "500.000",
142                        del: " - ",
143                        max: "800.000"
144                    },
145                    {
146                        min: "800.000",
147                        del: " - ",
148                        max: "1.200.000"
149                    },
150                    {
151                        min: "1.200.000",
152                        del: " - ",
153                        max: "1.600.000"
154                    },
155                    {
156                        min: "1.600.000",
157                        del: " - ",
158                        max: "2.000.000"
159                    },
160                    {
161                        min: "2.000.000",
162                        del: " - ",
163                        max: "3.000.000"
164                    },
165                    {
166                        min: "3.000.000",
167                        del: "+ ",
168                        max: ""
169                    }
170                ]
171            }
172        ];
173});
174**/

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.