PageSourceSearch

https://aryacleaners.com/wp-content/themes/greenearth-cleaning/js/custom_js.js?ver=6.9.9

js aryacleaners.com collected 2026-09-29 05:08:55 UTC 12,174 bytes, 329 lines download raw bytes

1jQuery(document).ready(function() {
2    if (jQuery(".home")[0]) {
3        jQuery.ajax({
4            url: window.location.protocol + "//" + window.location.host + "/" + 'tip_of_the_day.xml',
5            dataType: 'xml',
6            success: function(data) {
7                // Extract relevant data from XML
8                var currentday = '';
9                var currenttext = '';
10
11                var yesterday = moment().subtract(1, 'days').format("MM/DD/YYYY");
12                var yformat = moment().subtract(1, 'days').format("MM.DD");
13                var today = moment().format("MM/DD/YYYY");
14                var nformat = moment().format("MM.DD");
15                var tomorrow = moment().add(1, 'days').format("MM/DD/YYYY");
16                var tformat = moment().add(1, 'days').format("MM.DD");
17
18                yday = yesterday.split("/");
19                yesterday = yday[0] + "/" + yday[1] + "/2012";
20
21                tday = today.split("/");
22                today = tday[0] + "/" + tday[1] + "/2012";
23
24                mday = tomorrow.split("/");
25                tomorrow = mday[0] + "/" + mday[1] + "/2012";
26
27                var yesterdaytext = getText(data, yesterday, 1, yformat);
28                var todaytext = getText(data, today, 2, nformat);
29                var tomorrowtext = getText(data, tomorrow, 3, tformat);
30
31
32                function getText(data, whatday, box, format) {
33                    var found = 0;
34
35                    jQuery(data).find('tip').each(function() {
36
37                        jQuery(this).find("day").each(function() {
38                            var day = jQuery(this).text();
39
40                            if (day == whatday) {
41                                currentday = day;
42                                found = 1;
43                            }
44
45                        });
46
47                        if (found == 1) {
48                            jQuery(this).find("text").each(function() {
49                                var text = jQuery(this).text();
50                                currenttext = text;
51                                found = 0;
52                                jQuery('.day_tip_sec .boxcontainer .box' + box + ' .boxborder .title span').html(format);
53                                jQuery('.day_tip_sec .boxcontainer .box' + box + ' .boxborder .text').html(currenttext);
54                            });
55                        }
56
57
58                    });
59                }
60
61
62            },
63            error: function(data) {
64                console.log('Error loading XML data');
65            }
66        });
67
68    }
69    jQuery(".box1").click(function() {
70	
71        var titleHolder = jQuery(".box1 .title").html();
72        var textHolder = jQuery(".box1 .text").html();
73
74        jQuery(".box1 .title").html(jQuery(".box3 .title").html());
75        jQuery(".box1 .text").html(jQuery(".box3 .text").html());
76
77        jQuery(".box3 .title").html(jQuery(".box2 .title").html());
78        jQuery(".box3 .text").html(jQuery(".box2 .text").html());
79
80        jQuery(".box2 .title").html(titleHolder);
81        jQuery(".box2 .text").html(textHolder);
82
83    });
84
85    jQuery(".box3").click(function() {
86	
87        var titleHolder = jQuery(".box3 .title").html();
88        var textHolder = jQuery(".box3 .text").html();
89
90        jQuery(".box3 .title").html(jQuery(".box1 .title").html());
91        jQuery(".box3 .text").html(jQuery(".box1 .text").html());
92
93        jQuery(".box1 .title").html(jQuery(".box2 .title").html());
94        jQuery(".box1 .text").html(jQuery(".box2 .text").html());
95
96        jQuery(".box2 .title").html(titleHolder);
97        jQuery(".box2 .text").html(textHolder);
98
99    });
100
101    jQuery(function() {
102        // Bind the swipeleftHandler/swiperightHandler callback function to the swipe event on div.box
103        jQuery(".box2").on("swipeleft", swipeleftHandler);
104        jQuery(".box2").on("swiperight", swiperightHandler);
105        jQuery("#select .circle_left").on("click", swipeleftHandler);
106        jQuery("#select .circle_right").on("click", swiperightHandler);
107
108        // Callback function references the event target and adds the 'swipeleft' class to it
109        function swipeleftHandler(event) {
110            jQuery(".box3").click();
111        }
112        // Callback function references the event target and adds the 'swiperight' 
112class to it
113        function swiperightHandler(event) {
114            jQuery(".box1").click();
115        }
116    });
117    jQuery(".circleicon").click(function() {
118        var classcollect = jQuery(this).attr('class');
119        var classnames = classcollect.split(" ");
120        var lastChar = (String(classnames[2]).match(/\d+$/) || []).pop();
121        //console.log('%c Service Icon Click - lastChar/classnames[2]', 'color: purple;font-weight:bold;');
122        //console.log(classcollect);		
123        jQuery(".servicetext").hide();
124        jQuery(".service" + lastChar).show();
125        jQuery(".circleicon").removeClass('active');
126        jQuery(this).addClass('active');
127    });
128	jQuery(".print-coupons-button .elementor-button-link").click(function ()
129	{
130	  	/* var html = jQuery("#coupn_1").html(); */
131	  	var html = jQuery(this).parent().parent().parent().parent().find('.coupn_print').html();
132		var myWindow=window.open();
133		myWindow.document.write(html);
134		myWindow.document.close();
135		myWindow.focus();
136		myWindow.document.title = 'Coupon';
137		myWindow.print();
138		//myWindow.close();
139		return false;
140
141	});	
142
143
144
145});
146
147jQuery(document).on('click', '.circleicon img', function() {
148    var data_id = jQuery(this).parent().parent().parent().data('image');
149    jQuery(this).parent().parent().parent().addClass('active_cc');
150    jQuery('.circleicon').removeClass('active_cc');
151    jQuery('.circle_infoBx').hide();
152    jQuery('.circle_infoBx').removeClass('active_ccBx');
153    jQuery('.circle_infoBx#' + data_id).show();
154    jQuery('.circle_infoBx#' + data_id).addClass('active_ccBx');
155    return false;
156});
157jQuery(document).on('click', '.service_tags a', function() {
158    var data_id = jQuery(this).attr('href');
159    jQuery('.circleicon').removeClass('active_cc');
160    jQuery('.circleicon').removeClass('active');
161    jQuery('.circle_infoBx').hide();
162    jQuery('.circle_infoBx').removeClass('active_ccBx');
163    jQuery('.circle_infoBx' + data_id).show();
164    jQuery('.circle_infoBx' + data_id).addClass('active_ccBx');
165    jQuery('.circleicon' + data_id + '_cc').addClass('active_cc');
166    jQuery('.circleicon' + data_id + '_cc').addClass('active');
167    return false;
168});
169jQuery(document).on('click', '.next_prev_arrows a', function() {
170    var href = jQuery(this).attr('href');
171    if (href == '#next') {
172        var div_id = jQuery('.circle_infoBx.active_ccBx').attr('id');
173        if (div_id != 'intrpp_7') {
174            jQuery('.circle_infoBx.active_ccBx').hide();
175            jQuery('.circle_infoBx.active_ccBx').next().show();
176            var active = jQuery('.circle_infoBx.active_ccBx').removeClass('active_ccBx');
177            if (active.next() && active.next().length && active.next().not('.next_prev_arrows')) {
178                active.next().addClass('active_ccBx');
179                var act_div_id = active.next().attr('id');
180                jQuery('.circleicon').removeClass('active_cc');
181                jQuery('.circleicon').removeClass('active');
182                jQuery('.circleicon#' + act_div_id + '_cc').addClass('active_cc');
183                jQuery('.circleicon#' + act_div_id + '_cc').addClass('active');
184            }
185        } else {
186            return false;
187        }
188    } else {
189        var div_id = jQuery('.circle_infoBx.active_ccBx').attr('id');
190        if (div_id != 'intrpp_1') {
191            jQuery('.circle_infoBx.active_ccBx').hide();
192            jQuery('.circle_infoBx.active_ccBx').prev().show();
193            var active = jQuery('.circle_infoBx.active_ccBx').removeClass('active_ccBx');
194            if (active.prev() && active.prev().length && active.prev().not('.next_prev_arrows')) {
195                active.prev().addClass('active_ccBx');
196                var act_div_id = active.prev().attr('id');
197                jQuery('.circleicon').removeClass('active_cc');
198                jQuery('.circleicon').removeClass('active');
199                jQuery('.circleicon#' + act_div_id + '_cc').addClass('active_cc');
200                jQuery('.circleicon#' + act_div_id + '_cc').addClass('active');
201            }
202        } else {
203            return false;
204        }
205    }
206    return false;
207});
208jQuery(document).on('click', '.acc-head>a', function(e) {
209    e.preventDefault();
210    var accBody = jQuery(this).parents(".acc-element").find(".acc-body"),
211        accBodyEle = accBody.find(".child-acc");
212    if (jQuery(this).hasClass('trigger')) {
213        if (!jQuery(this).parent().hasClass('opened')) {
214            jQuery(this).parent().addClass('opened')
215            jQuery(this).parent().next().show();
216        } else {
217            jQuery(this).parent().removeClass('opened');
218            jQuery(this).parent().next().hide();
219        }
220        var cat = jQuery(this).data("for"),
221            data = {
222                action: "get_cleaning_tip_posts",
223                cat: cat
224            };
225        if (!accBodyEle.hasClass("has-content")) {
226            accBodyEle.html('<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>');
227            jQuery.post(ajax_object.ajax_url, data, function(response) {
228                accBodyEle.html(response);
229                accBodyEle.addClass("has-content");
230            });
231        }
232    } else {
233        var chidlAcc = jQuery(this).parents('.child-acc');
234        chidlAcc.find('.acc-body').hide();
235        if (!jQuery(this).parent().hasClass('opened')) {
236            chidlAcc.find('.acc-head').removeClass('opened');
237            jQuery(this).parent().addClass('opened')
238            jQuery(this).parent().next().show();
239        } else {
240            jQuery(this).parent().removeClass('opened')
241        }
242    }
243})
244
245jQuery(document).on("change", "#cat-filter", function() {
246    var toshow = '.acc-element' + ((jQuery(this).val()) ? '.' + jQuery(this).val() : '');
247    jQuery('.acc-element').hide()
248    jQuery('.acc-body').hide();
249    jQuery('.acc-head').removeClass('opened');
250    jQuery(toshow).show();
251    if (jQuery(this).val() != "")
252        jQuery(toshow).find('a.trigger').trigger('click');
253});
254
255
256
257jQuery(document).ready(function ($) { 
258
259	/** Scroll Speed JS **/
260    $('a[href^="#"]').on('click',function (e) {
261        e.preventDefault();
262        var target = this.hash,
263        $target = $(target);
264        $('html, body').stop().animate({
265            'scrollTop': $target.offset().top
266        }, 4000, 'swing', function() {
267            window.location.hash = target;
268        });
269    });   
270
271});
272
273
274jQuery(window).on('load', function(){
275
276    /** Taggle According on Mobile **/
277	jQuery('.cleaning_tips_tabs .elementor-tab-mobile-title').click(function(){
278
279		if (jQuery(".elementor-tab-content").hasClass("elementor-active")) {
280		  	jQuery(this).next('.elementor-tab-content').toggleClass('opened');
281		}
282		else {
283			jQuery('.cleaning_tips_tabs .elementor-tab-content').removeClass('elementor-active');
284			jQuery('.cleaning_tips_tabs .elementor-tab-content').removeClass('opened');
285		}
286
287    });
288
289
290});
291
292
293jQuery(document).ready(function(){
294
295	jQuery('.menu_item_newsletter a').click(function(e){
296		e.preventDefault();
297		jQuery('.newsletter_popup_outer').fadeIn();
298	});
299	jQuery('.cus_popup_trigger a').click(function(e){
300		e.preventDefault();
301		jQuery('.cus_form_popup').fadeIn();
302	});
303
304	jQuery('.nl_popup_close ').click(function(){
305		jQuery('.newsletter_popup_outer').fadeOut()
306	});
307	jQuery('.close_pp ').click(function(){
308		jQuery('.cus_form_popup').fadeOut()
309	});
310	jQuery(document).on("click", ".submit_postcode", function()
311	{
312		var postal_code = jQuery.trim(jQuery('.postcode_check_input').val());
313		jQuery('.delivery_form_inr #result').remove();
314		if(postal_code=='')
315		{
316			alert('please enter postal code');
317			jQuery('.postcode_check_input').focus();
318			return false;
319		}
320		var databc = {
321			'action': 'search_postal_code',
322			'postal_code': postal_code,
323		};
324		jQuery.post(ajax_object.ajax_url, databc, function(response)
325		{
326			jQuery('.delivery_form_inr').append(response);
327		});
328	});
329});

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.