PageSourceSearch

https://tripletshomes.com/assets/js/main-script.js?v1.9

js tripletshomes.com collected 2026-10-07 04:21:08 UTC 20,158 bytes, 496 lines download raw bytes

1function createCookie(name, value, days) {
2    if (days) {
3        var date = new Date();
4        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
5        var expires = "; expires=" + date.toGMTString();
6    } else var expires = "";
7    document.cookie = name + "=" + value + expires + "; path=/";
8}
9function readCookie(name) {
10    var nameEQ = name + "=";
11    var ca = document.cookie.split(';');
12    for (var i = 0; i < ca.length; i++) {
13        var c = ca[i];
14        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
15        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
16    }
17    return null;
18}
19function getCookie(e) {
20    let t = document.cookie.split("; ");
21    for (let n = 0; n < t.length; n++) {
22        let [a, o] = t[n].split("=");
23        if (a === e) return o;
24    }
25    return null;
26}
27function setCookie(e, t, n) {
28    let a = "";
29    if (n) {
30        let o = new Date();
31        o.setTime(o.getTime() + 864e5 * n), (a = `; expires=${o.toUTCString()}`);
32    }
33    document.cookie = `${e}=${t}${a}; path=/`;
34}
35
36$(function () {
37    $(window).width() > 1200 &&
38        ($(".ddown").hover(
39            function () {
40                $(this).children("ul").stop(!0).delay(150).slideDown(350);
41            },
42            function () {
43                $(this).children("ul").stop(!0).delay(150).slideUp(300);
44            }
45        ),
46        $(".drp").on("click", function (e) {
47            $(".submenu").next().hasClass("show") || $(".submenu").removeClass("show");
48        })),
49        $(".dropdown-menu a.dropdown-toggle").on("click", function (e) {
50            return (
51                $(this).next().hasClass("show") || $(this).parents(".dropdown-menu").first().find(".show").removeClass("show"),
52                $(this).next(".dropdown-menu").toggleClass("show"),
53                $(this)
54                    .parents("li.nav-item.dropdown.show")
55                    .on("hidden.bs.dropdown", function (e) {
56                        $(".dropdown-submenu .show").removeClass("show");
57                    }),
58                !1
59            );
60        });
61}),
62    (window.onload = function () {
63        $("#box").css("animation-play-state", "running"),
64            "true" === getCookie("chatBoxClosed") ? ($(".wp-chat-box").toggleClass("hide"), $(".wp-icon-link").toggleClass("show")) : $(".wp-chat-box").removeClass("d-none"),
65            $(".wp-chat-box .close").click(function () {
66                $(".wp-chat-box").toggleClass("hide"), $(".wp-icon-link").toggleClass("show"), setCookie("chatBoxClosed", "true", 1);
67            }),
68            $(".wp-icon-link").click(function () {
69                $(".wp-icon-link").toggleClass("show"), $(".wp-chat-box").removeClass("d-none"), $(".wp-chat-box").toggleClass("hide"), $("#player")[0].play();
70            });
71    }),
72    $(document).ready(function () {
73        var owl = $('.properties-slider-detail');
74        owl.owlCarousel({
75            loop: true,
76            margin: 0,
77            nav: false,
78            dots: false,
79            // animateOut: 'fadeOut',
80            autoplay: true,
81            autoplayTimeout: 4000,
82            autoplayHoverPause: true,
83            autoplaySpeed: 2000,
84            responsive: {
85                0: {
86                    items: 1,
87                    center: true
88                },
89                600: {
90                    items: 3
91                },
92                1000: {
93                    items: 3
94                }
95            }
96        });
97        
98      
99        var owl = $('.awards-slider');
100        owl.owlCarousel({
101            loop: true,
102            rewindNav: false,
103            nav: true,
104            margin: 30,
105            dots: false,
106            center: false,
107            autoplay: true,
108            autoplayTimeout: 3000,
109            autoplayHoverPause: true,
110            autoplaySpeed: 1500,
111            responsive: {
112                0: {
113                    items: 1,
114                    margin: 15,
115                    nav: false
116                },
117                600: {
118                    items: 2
119                },
120                992: {
121                    items: 3
122                },
123                1200: {
124                    items: 4
125                },
126
127                1600: {
128                    items: 4
129                }
130            }
131        });
132
133        document.getElementById("phone_number").addEventListener("input", function (e) {
134            e.target.value.length;
135            var n = e.target.value.replace(/\D/g, "").match(/(\d{0,3})(\d{0,3})(\d{0,4})/);
136            e.target.value = n[2] ? "(" + n[1] + ") " + n[2] + (n[3] ? "-" + n[3] : "") : n[1];
137        }),
138            $("#phone_number").blur(function (e) {
139                e.target.value.replace(/[^0-9]/g, "").length < 10 ? $("#phone_number").val("") : 10 == e.target.value.replace(/[^0-9]/g, "").length && $("#phone_number").val("+1" + e.target.value);
140            }),
141            $(".dropdown-menu.ddRange").click(function (e) {
142                e.stopPropagation();
143            }),
144            $("ul.main li a.share").click(function () {
145                $("ul.social").toggleClass("share-active");
146            }),
147            $(".thumb").click(function (e) {
148                var n = $(".image-view img"),
149                    a = $(".image-view a");
150                n.attr("src", $(this).attr("data-src")), a.attr("href", $(this).attr("data-src")), $(".image-view iframe").removeClass("main-nav"), $(".image-view .popup-link").removeClass("main-nav");
151            }),
152            $(".advanced-search").click(function () {
153                $(".search-by-bottom").toggleClass("main"), $(".advanced-search").toggleClass("main");
154            }),
155            $(".fav").click(function () {
156                $(".fav").toggleClass("main");
157            }),
158            $("a.whatsappfixed").on("click", function () {
159                $(".whatsapp-links").toggle();
160            }),
161            $(".more-filters-toggle").click(function () {
162                $(".more-filters").toggleClass("show");
163            });
164        var e = $(".navbar").outerHeight();
165        $(".map-search-page .inner-content,.map-search-page .inner-content .more-filters,.map-search-page .inner-content .map-properties,.map-search-page .inner-content iframe").css({ height: `calc(100vh - ${e}px)` }),
166            $(".show-less").click(function () {
167                $(".show-less").toggleClass("main"), $(".property-detail-inner .bg-common .detail-block").toggleClass("main");
168            }),
169            $(".fav").on("click", function () {
170                $(this).toggleClass("active");
171            });
172    }),
173    $(".account").click(function () {
174        $("#consultation-modal-one").hide(), $("#consultation-modal").modal("show"), $("#consultation-modal").show();
175    });
176    $('#submit-modal').on('hidden.bs.modal', function () {
177        $('#submit-modal form')[0].reset();
178    });
179    $('.forgot').click(function()
180    {
181        $('#exampleModal').modal('hide');
182        $('#forgotModal').modal('show');
183    });
184    $('#exampleModal').on('hidden.bs.modal', function () {
185    $('#exampleModal form')[0].reset();
186    $('#check').html('');
187    });
188    $('#forgotModal').on('hidden.bs.modal', function () {
189    $('#forgotModal form')[0].reset();
190    $('#email-error-message').html('');
191    $('#success-message').html('');
192    });
193    $(document).ready(function () {
194        
195
196        // $(".index-page .cities a.show-more").click(function () {
197        //     $(".index-page .cities .blocks .main").toggleClass("active");
198        //     $(".index-page .cities a.show-more").toggleClass("active");
199        // });
200        
201        $(".toggle-menu-link,.toggle-menu").click(function () {
202            $(".toggle-menu-content").toggleClass("show");
203            $(".toggle-menu-link").toggleClass("show");
204        });
205
206        $('#thanks-modal-one').on('hidden.bs.modal', function () {
207            $('.modal-backdrop').remove();
208            $('body').css('overflow', 'auto');
209        });
210
211          // make it as accordion for smaller screens
212          if ($(window).width() < 200) {
213            $('.dropdown-menu a').click(function(e) {
214                e.preventDefault();
215                if ($(this).next('.submenu').length) {
216                    $(this).next('.submenu').toggle();
217                }
218                $('.dropdown').on('hide.bs.dropdown', function() {
219                    $(this).find('.submenu').hide();
220                })
221            });
222        }
223
224        $(document).on('submit','#home-valuation',function(e)
225        {
226        //var userSession = @json($user_session);
227        var phone = $('#phone_number').val();
228       
229           e.preventDefault();
230           $('#home-submit').val('Please Wait...');
231           if(phone.length < 14){
232          
233               $('#phone_number').val('');
234               return false;
235            }
236           else if(phone.length != 16){
237               $("#phone_number").val('+1' + phone);
238           }
239           $.ajaxSetup({
240               headers: {
241                   'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
242               }
243           });
244
245           url ="{{route('valueDetails')}}";
246           var datas = $(this).serialize();
247           grecaptcha.ready(function () {
248               grecaptcha.execute("{{config('envs.recaptcha_key')}}", {action: "contact"}).then(function (token) {
249                   $.ajax({
250                       url: url,
251                       type: "POST",
252                       data: datas + "&recaptcha-response=" + token,
253                       success: function (e) {
254                        "OK" == e && ($("#consultation-modal").modal("hide"), $("#thanks-modal").modal("show")),
255                            $("#submit").val(a),
256                            $("#submit").html(a),
257                            null === userSession &&
258                                ($(".property-form").trigger("reset"),
259                                $(".property-form").find("input[type='text'], input[type='tel'], input[type='number'], input[type='email'], textarea").val("").removeAttr("value").removeAttr("readonly"));
260                           $('input').attr('value','');
261                           $("#home-submit").val('Continue')
262                           window.location = '/show-my-property-value-result';   
263
264                       }
265
266                   });
267               });
268           });
269        });
270
271        $('.userlogout').on('click', function(){
272           
273            $.ajaxSetup({
274                headers: {
275                    'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
276                }
277            });
278            grecaptcha.ready(function () {
279                grecaptcha.execute(recaptcha, { action: "contact" }).then(function (token) {
280                    $.ajax({
281                        type: 'post',
282                        url: '/user-logout',
283                        data: "&recaptcha-response=" + token,
284                        success: function (response) {
285                        
286                            if (response == 'OK') {
287                               location.reload();
288
289                            }
290                
291                        },
292                    
293                    });
294                })
295            })
296        });
297    
298
299      
300        
301    });
302    $(document).on('submit', '.testimonial-form', function (event) {
303        var type = $(this).attr('data-type');
304        var datas = $(this).serialize();
305        var text = $("#submit").val();
306    
307        $.ajaxSetup({
308            headers: {
309                'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
310            }
311        });
312    
313        $("#submit").val('Please wait ..');
314        $("#submit").html('Please wait ..');
315        event.preventDefault();
316        grecaptcha.ready(function () {
317            grecaptcha.execute(recaptcha, { action: "contact" }).then(function (token) {
318                $.ajax({
319                    type: 'post',
320                    url: '/testimonial',
321                    data: datas + "&recaptcha-response=" + token,
322                    success: function (response) {
323                        if (response == 'OK') {
324                            $("#submit-modal").hide();
325                            if (type == 'signup') {
326                                location.reload();
327                            } else {
328                                $("#thanks-modal-one").modal('show');
329                            }
330                        }
331                        $("#submit").val(text);
332                        $("#submit").html(text);
333                        $(".testimonial-form").trigger('reset');
334                        $(".testimonial-form").find("input[type='text'], input[type='tel'], input[type='number'], input[type='email'], textarea").val("").removeAttr("value");
335                    },
336                    error: function () {
337                        alert('Some error occurred');
338                    }
339                });
340            });
341        });
342
343
344    });
345
346    $(document).on('submit', '.enquiry-form', function (event) {
347
348        event.preventDefault();
349      
350        var t = $("#phone_number").val();
351            //      var phone = $('#phone_number').val();
352         
353         var type=$(this).attr('data-type');
354         var text =$('.submit').val();
355         var datas = $(this).serialize();
356         if (($.ajaxSetup({ headers: { "X-CSRF-Token": $('meta[name="csrf-token"]').attr("content") } }), t.length < 14)) return $("#phone_number").val(""), !1;
357         16 != t.length && $("#phone_number").val("+1" + t),
358        
359        $(".submit").val('Please wait ..');
360        $(".submit").html('Please wait ..');
361        
362        grecaptcha.ready(function () {
363            grecaptcha.execute(recaptcha, { action: "contact" }).then(function (token) {
364                 $.ajax({
365                     type: 'post',
366                     url: '/enquiry',
367                     data: datas + "&recaptcha-response=" + token,
368                     success: function (response) {
369                        if (response == 'OK') {
370                                 $(".modal").modal('hide')
371                                 $("#thanks-modal").modal('show')
372                             }
373 
374                         $(".submit").val(text);
375                         $(".submit").html(text);
376                         $(".contact-message, .blog-message").val(""),
377                         null == userSession &&
378
379                            ($(".enquiry-form").trigger("reset"),
380                            $(".enquiry-form").find("input[type='text'], input[type='tel'], input[type='number'], input[type='email'], textarea").val("").removeAttr("value").removeAttr("readonly"));
381                             
382                        // }
383                     },
384                     error: function () {
385                         alert('Some error occurred');
386                     }
387                 });
388             })
389         })
390     });
391
392     $(document).on('submit', '.enquiry-form-welcome', function (event) {
393
394        event.preventDefault();
395        
396
397        var t = $("#phone_number5").val();
398            //      var phone = $('#phone_number').val();
399         
400         var type=$(this).attr('data-type');
401         var text =$('.submit').val();
402         var datas = $(this).serialize();
403         if (($.ajaxSetup({ headers: { "X-CSRF-Token": $('meta[name="csrf-token"]').attr("content") } }), t.length < 14)) return $("#phone_number5").val(""), !1;
404         16 != t.length && $("#phone_number5").val("+1" + t),
405        
406        $(".submit").val('Please wait ..');
407        $(".submit").html('Please wait ..');
408        
409        grecaptcha.ready(function () {
410            grecaptcha.execute(recaptcha, { action: "contact" }).then(function (token) {
411                 $.ajax({
412                     type: 'post',
413                     url: '/enquiry',
414                     data: datas + "&recaptcha-response=" + token,
415                     success: function (response) {
416                        if (response == 'OK') {
417                                 $(".modal").modal('hide')
418                                 $("#thanks-modal").modal('show')
419                             }
420 
421                         $(".submit").val(text);
422                         $(".submit").html(text);
423                         $(".contact-message, .blog-message").val(""),
424                         null == userSession &&
425                            ($(".enquiry-form-welcome").trigger("reset"),
426                            $(".enquiry-form-welcome").find("input[type='text'], input[type='tel'], input[type='number'], input[type='email'], textarea").val("").removeAttr("value").removeAttr("readonly"));
427                             
428                        // }
429                     },
430                     error: function () {
431                         alert('Some error occurred');
432                     }
433                 });
434             })
435         })
436     });
437
438     $(document).on('submit', '.forgot-form', function (event) {
439        var datas = $(this).serialize();
440        var text = $(".submit").val();
441        $.ajaxSetup({
442            headers: {
443                'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
444            }
445        });
446       
447        $("#forgot-submit").html('Please wait ..');
448        event.preventDefault();
449        grecaptcha.ready(function () {
450            grecaptcha.execute(recaptcha, { action: "contact" }).then(function (token) {
451                $.ajax({
452                    type: 'post',
453                    url: '/forgot-password',
454                    data: datas + "&recaptcha-response=" + token,
455                    success: function (response) {
456                        $("#forgot-submit").val('SUBMIT');
457                        if (response == 'OK') {
458                            $('#email-error-message').empty();
459                            $("#forgot-submit").html('Submit');
460                            document.getElementById("success-message").innerHTML ="<span style='color:#2dd92d;'>Please check your mail for setting new password</span>";
461                           
462                        }
463                        if (response == 'valid email') {
464                            $('#success-message').empty();
465                            $("#forgot-submit").html('Submit');
466                            document.getElementById("success-message").innerHTML ="<span style='color:red;'>User does not exist or Email id not verified</span>";
467
468                           // document.getElementById("email-error-message").innerHTML ="<span style='color:red;'>User does not exist or Email id not verified</span>";
469                           
470                        }
471
472                        $(".forgot-form").trigger('reset');
473                    },
474                    error: function (response) {
475                        document.getElementById('response').innerHTML = "<span style='color:#000000;'>
475Password is invalid..!</span>";
476                    }
477                    
478                });
479            })
480        });
481
482
483        // $('input[type="text"], textarea, input[type="number"], input[type="email"], input[type="password"], input[type="tel"]').each(function () {
484        //     null == userSession && $(this).attr("value", ""),
485        //         $(this).on("keyup", function () {
486        //             $(this).attr("value", $(this).val().trim()), "" === $(this).val().trim() ? (this.setCustomValidity("Please fill out this field."), $(this).trigger("input")) : this.setCustomValidity("");
487        //         });
488        // });
489    });
490
491    $('input[type="text"], textarea, input[type="number"], input[type="email"], input[type="password"], input[type="tel"]').each(function () {
492        null == userSession && $(this).attr("value", ""),
493            $(this).on("keyup", function () {
494                $(this).attr("value", $(this).val().trim()), "" === $(this).val().trim() ? (this.setCustomValidity("Please fill out this field."), $(this).trigger("input")) : this.setCustomValidity("");
495            });
496    });

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.