PageSourceSearch

https://www.chiragdaruwalla.com/wp-content/themes/shiva/js/custom.js

js chiragdaruwalla.com collected 2026-10-08 10:17:13 UTC 9,274 bytes, 324 lines download raw bytes

1/*Page Loader*/
2jQuery(window).on('load', function(){
3	jQuery(".loader").fadeOut("slow");
4});
5/*Page Loader End*/
6
7var btn = $('#button');
8
9jQuery(window).scroll(function() {
10  if (jQuery(window).scrollTop() > 300) {
11    btn.addClass('show');
12  } else {
13    btn.removeClass('show');
14  }
15});
16
17btn.on('click', function(e) {
18  e.preventDefault();
19  jQuery('html, body').animate({scrollTop:0}, '300');
20});
21
22  
23var header_h = jQuery('.site-header').innerHeight();
24jQuery('.header-spacer').css('height',header_h);
25  
26jQuery(window).scroll(function(){
27	
28	AOS.init({
29		once: true,
30	});
31
32	if (jQuery(window).scrollTop() >= 50) {
33		jQuery('.side-header-middle').slideUp();
34	}
35	else {
36		jQuery('.side-header-middle').slideDown();
37	}
38});
39  
40jQuery(document).ready(function(){
41  
42	jQuery('.home-carousel').slick({
43		dots: true,
44		arrows: false,
45		infinite: true,
46		speed: 500,
47		fade: true,
48		autoplay: true,         // Enable auto sliding
49		autoplaySpeed: 3000,     // Set auto slide interval to 5 seconds (5000 milliseconds)
50		cssEase: 'linear'
51	});
52
53    jQuery('.banner_carousel').slick({
54		dots: true,
55		arrows: false,
56		infinite: true,
57		speed: 500,
58		autoplay: true,         // Enable auto sliding
59		autoplaySpeed: 3000     // Set auto slide interval to 5 seconds (5000 milliseconds)
60	});
61
62    jQuery('.banner_rh_slider').slick({
63		dots: true,
64		arrows: false,
65		infinite: true,
66		speed: 500,
67		autoplay: true,         // Enable auto sliding
68		autoplaySpeed: 3000     // Set auto slide interval to 5 seconds (5000 milliseconds)
69	});
70
71    jQuery('.personalised__rh__slider').slick({
72		dots: false,
73		arrows: true,
74        slidesToShow: 4,
75        slidesToScroll: 1,
76		infinite: true,
77		autoplay: true,         // Enable auto sliding
78		autoplaySpeed: 3000,     // Set auto slide interval to 5 seconds (5000 milliseconds)
79		speed: 500,
80        responsive: [
81        {
82            breakpoint: 1365,
83            settings: {
84            slidesToShow: 3,
85            slidesToScroll: 1,
86            }
87        },
88        {
89            breakpoint: 767,
90            settings: {
91            slidesToShow: 2,
92            slidesToScroll: 1,
93            }
94        },
95        {
96            breakpoint: 600,
97            settings: {
98            slidesToShow: 1,
99            slidesToScroll: 1
100            }
101        },
102        ]
103	});
104
105    jQuery('.blog_carousel').slick({
106		dots: false,
107		arrows: true,
108        slidesToShow: 4,
109        slidesToScroll: 1,
110		infinite: false,
111		autoplay: true,         // Enable auto sliding
112		autoplaySpeed: 3000,     // Set auto slide interval to 5 seconds (5000 milliseconds)
113		speed: 500,
114        responsive: [
115        {
116            breakpoint: 1365,
117            settings: {
118            slidesToShow: 3,
119            slidesToScroll: 1,
120            }
121        },
122        {
123            breakpoint: 1023,
124            settings: {
125            slidesToShow: 2,
126            slidesToScroll: 1,
127            }
128        },
129        {
130            breakpoint: 640,
131            settings: {
132            slidesToShow: 1,
133            slidesToScroll: 1
134            }
135        },
136        ]
137	});
138
139    jQuery('.testimonials__slider').slick({
140		dots: false,
141		arrows: true,
142        slidesToShow: 3,
143        slidesToScroll: 1,
144		infinite: false,
145		autoplay: true,         // Enable auto sliding
146		autoplaySpeed: 3000,     // Set auto slide interval to 5 seconds (5000 milliseconds)
147		speed: 500,
148        responsive: [
149        {
150            breakpoint: 1023,
151            settings: {
152            slidesToShow: 2,
153            slidesToScroll: 1,
154            }
155        },
156        {
157            breakpoint: 767,
158            settings: {
159            slidesToShow: 1,
160            slidesToScroll: 1
161            }
162        },
163        ]
164	});
165
166    jQuery('.talk-astrologer-slider').slick({
167		dots: false,
168		arrows: true,
169        slidesToShow: 4,
170        slidesToScroll: 1,
171		infinite: false,
172		speed: 500,
173	});
174
175    jQuery('.blog-hero-slider').slick({
176		dots: true,
177		arrows: false,
178        slidesToShow: 1,
179        slidesToScroll: 1,
180		infinite: false,
181		speed: 500,
182	});
183
184
185    jQuery('.testimonial-slider').slick({
186		dots: true,
187		arrows: false,
188		infinite: false,
189		speed: 500,
190	});
191
192	$('.count').each(function() {
193		$(this).prop('counter', 0).animate({
194		  counter: $(this).text()
195		}, {duration: 4000,easing: 'swing',step: function(now) {	  
196			$(this).text(Math.ceil(now));}
197		});
198	});
199    Fancybox.bind("[data-fancybox]", {
200        // Your custom options
201      });
202
203    jQuery('.sidebar-accordion__heading').click(function(e) {
204        jQuery('.sidebar-accordion__content').slideUp();
205        jQuery('.active').not(this).removeClass('active');
206        if (jQuery(this).hasClass('active')) {
207          jQuery(this).removeClass('active');
208        jQuery(this).next('.sidebar-accordion__content').slideUp();
209        }else{
210            jQuery(this).addClass('active');
211            jQuery(this).next('.sidebar-accordion__content').slideDown();
212        }
213    });
214    jQuery('.faq__title').click(function(e) {
215        jQuery('.faq__caps').slideUp();
216        jQuery('.active').not(this).removeClass('active');
217        if (jQuery(this).hasClass('active')) {
218            jQuery(this).removeClass('active');
219            jQuery(this).next('.faq__caps').slideUp();
220        }else{
221            jQuery(this).addClass('active');
222            jQuery(this).next('.faq__caps').slideDown();
223        }
224    });
225
226    /*jQuery(function() {
227        jQuery('a[href*="#"]:not([href="#"])').click(function() {
228          if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
229            var target = jQuery(this.hash);
230            target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
231            if (target.length) {
232              jQuery('html, body').animate({
233                scrollTop: target.offset().top - jQuery("header").outerHeight()
234              }, 100);
235              return false;
236            }
237          }
238        });
239    });*/
240	jQuery(function() {
241	  jQuery('.zodiac-signs a[href*="#"]:not([href="#"])').click(function() {
242		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
243		  var target = jQuery(this.hash);
244		  target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
245		  if (target.length) {
246			jQuery('html, body').animate({
247			  scrollTop: target.offset().top - jQuery("header").outerHeight()
248			}, 100);
249			return false;
250		  }
251		}
252	  });
253	});
254});
255
256/*Responsive Menu*/
257(function($) {
258    jQuery.fn.menumaker = function(options) {
259        var cssmenu = jQuery(this),
260            settings = jQuery.extend({
261                format: "dropdown",
262                sticky: false
263            }, options);
264        return this.each(function() {
265            jQuery(".hamburger-icon").on('click', function() {
266                jQuery(this).toggleClass('menu-opened');
267                jQuery('.nav_menu').slideToggle();
268                var mainmenu = jQuery('.nav_menu').find('nav').find('ul:first-child');
269                if(mainmenu.hasClass('open')){
270                    mainmenu.slideToggle().removeClass('open');
271                } else {
272                    mainmenu.slideToggle().addClass('open');
273                    if (settings.format === "dropdown") {
274                        mainmenu.find('ul').show();
275                    }
276                }
277            });
278            cssmenu.find('li ul').parent().addClass('has-sub');
279            multiTg = function() {
280                cssmenu.find(".has-sub").prepend('<span class="submenu-button"></span>');
281                cssmenu.find('.submenu-button').on('click', function() {
282                    jQuery(this).toggleClass('submenu-opened');
283                    if (jQuery(this).siblings('ul').hasClass('open')) {
284                        jQuery(this).siblings('ul').removeClass('open').slideToggle();
285                    } else {
286                        jQuery(this).siblings('ul').addClass('open').slideToggle();
287                    }
288                });
289            };
290            if (settings.format === 'multitoggle') multiTg();
291            else cssmenu.addClass('dropdown');
292            if (settings.sticky === true) cssmenu.css('position', 'fixed');
293            resizeFix = function() {
294                var mediasize = 1023;
295                if (jQuery(window).width() <= mediasize) {
296                    cssmenu.find('ul').hide().removeClass('open');
297                }
298            };
299            resizeFix();
300            return jQuery(window).on('resize', resizeFix);
301        });
302    };
303})(jQuery);
304
305(function(jQuery) {
306    jQuery(document).ready(function() {
307        jQuery(".nav_menu nav").menumaker({
308            format: "multitoggle"
309        });
310    });
311})(jQuery);
312    
313/*Responsive Menu */
314jQuery('.horoscope__tab > ul > li').click( function() {
315	var tabID = jQuery(this).attr('data-tab');
316	jQuery(this).addClass('active').siblings().removeClass('active');
317	jQuery('#tab-'+tabID).addClass('active').siblings().removeClass('active');
318});
319jQuery('.zodiac-tab > li').click( function() {
320	var tabIDB = jQuery(this).attr('data-sub-tab');
321	jQuery(this).addClass('active').siblings().removeClass('active');
322	jQuery('#sub-tab-'+tabIDB).addClass('active').siblings().removeClass('active');
323});
324

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.