PageSourceSearch

https://www.setopati.com/themes/setopati/js/apps.js?v=10.0

js setopati.com collected 2026-10-02 05:43:03 UTC 20,793 bytes, 680 lines download raw bytes

1(function($) {
2    "use strict";
3
4
5
6    jQuery(document).ready(function($) {
7        // main slider
8
9        // if ($('.mainslider').length) {
10        //     $(".mainslider").owlCarousel({
11        //         items: 1,
12        //         loop: true,
13        //         autoplay: true,
14        //         animateOut: 'fadeOut',
15        //         autoplayHoverPause: true,
16        //         singleItem: true,
17        //         autoplayTimeout: 6000,
18        //         autoplaySpeed: 4000,
19        //         //navSpeed: 500,
20        //         dots: true,
21        //         nav: false,
22        //         responsiveClass: true,
23        //         onInitialize: function(event) {
24        //             if ($('.mainslider .item').length <= 1) {
25        //                 this.settings.loop = false;
26        //             }
27        //         },
28        //         responsive: {
29        //             0: {
30        //                 items: 1,
31        //                 nav: false,
32        //                 dots: true,
33        //                 loop: true
34        //             },
35        //             600: {
36        //                 items: 1,
37        //                 nav: false,
38        //                 dots: true,
39        //                 loop: true
40        //             }
41
42        //         },
43        //         navText: [
44        //             '<i class="fa fa-angle-left"></i>',
45        //             '<i class="fa fa-angle-right"></i>'
46        //         ]
47        //     });
48
49        // }
50
51
52        if ($('.sifaris-slider').length) {
53            $(".sifaris-slider").owlCarousel({
54                items: 2,
55                loop: true,
56                autoplay: true,
57                margin: 30,
58                //animateOut: 'fadeOut',
59                autoplayHoverPause: true,
60                singleItem: true,
61                autoplayTimeout: 6000,
62                autoplaySpeed: 4000,
63                //navSpeed: 500,
64                dots: true,
65                nav: false,
66                responsiveClass: true,
67                onInitialize: function(event) {
68                    if ($('.sifaris-slider .items').length <= 1) {
69                        this.settings.loop = false;
70                    }
71                },
72                responsive: {
73                    0: {
74                        items: 1,
75                        nav: false,
76                        dots: true,
77                        loop: true
78                    },
79                    600: {
80                        items: 1,
81                        nav: false,
82                        dots: true,
83                        loop: true
84                    },
85
86                    1000: {
87                        items: 2,
88                        nav: false,
89                        dots: true,
90                        loop: true
91                    }
92
93
94                },
95                navText: [
96                    '<i class="fa fa-angle-left"></i>',
97                    '<i class="fa fa-angle-right"></i>'
98                ]
99            });
100
101        }
102
103        // video slider
104
105        if ($('.video-slider').length) {
106            $(".video-slider").owlCarousel({
107                items: 3,
108                loop: true,
109                autoplay: true,
110                margin: 30,
111                //animateOut: 'fadeOut',
112                autoplayHoverPause: true,
113                singleItem: true,
114                autoplayTimeout: 6000,
115                autoplaySpeed: 4000,
116                //navSpeed: 500,
117                dots: true,
118                nav: false,
119                responsiveClass: true,
120                onInitialize: function(event) {
121                    if ($('.video-slider .items').length <= 1) {
122                        this.settings.loop = false;
123                    }
124                },
125                responsive: {
126                    0: {
127                        items: 1,
128                        nav: false,
129                        dots: true,
130                        loop: true
131                    },
132                    600: {
133                        items: 2,
134                        nav: false,
135                        dots: true,
136                        loop: true
137                    },
138
139                    1000: {
140                        items: 3,
141                        nav: false,
142                        dots: true,
143                        loop: true
144                    }
145
146                },
147                navText: [
148                    '<i class="fa fa-angle-left"></i>',
149                    '<i class="fa fa-angle-right"></i>'
150                ]
151            });
152
153        }
154
155
156
157
158        // photo slider
159
160        if ($('.photo-slider').length) {
161            $(".photo-slider").owlCarousel({
162                items: 1,
163                loop: true,
164                autoplay: true,
165                margin: 0,
166                animateOut: 'fadeOut',
167                autoplayHoverPause: true,
168                singleItem: true,
169                autoplayTimeout: 6000,
170                autoplaySpeed: 4000,
171                //navSpeed: 500,
172                dots: true,
173                nav: false,
174                responsiveClass: true,
175                onInitialize: function(event) {
176                    if ($('.photo-slider .items').length <= 1) {
177                        this.settings.loop = false;
178                    }
179                },
180                responsive: {
181                    0: {
182                        items: 1,
183                        nav: true,
184                        dots: false,
185                        loop: true
186                    },
187                    600: {
188                        items: 1,
189                        nav: true,
190                        dots: false,
191                        loop: true
192                    },
193
194                    1000: {
195                        items: 1,
196                        nav: true,
197                        dots: false,
198                        loop: true
199                    }
200
201                },
202                navText: [
203                    '<i class="fa fa-chevron-left"></i>',
204                    '<i class="fa fa-chevron-right"></i>'
205                ]
206            });
207
208        }
209
210        // gumfir slider
211
212        if ($('.ghumfir-slider').length) {
213            $(".ghumfir-slider").owlCarousel({
214                items: 2,
215                loop: true,
216                autoplay: true,
217                margin: 30,
218                animateOut: 'fadeOut',
219                autoplayHoverPause: true,
220                singleItem: true,
221                autoplayTimeout: 6000,
222                autoplaySpeed: 4000,
223                //navSpeed: 500,
224                dots: true,
225                nav: false,
226                responsiveClass: true,
227                onInitialize: function(event) {
228                    if ($('.ghumfir-slider .items').length <= 1) {
229                        this.settings.loop = false;
230                    }
231                },
232                responsive: {
233                    0: {
234                        items: 1,
235                        nav: false,
236                        dots: true,
237                        loop: true
238                    },
239                    600: {
240                        items: 2,
241                        nav: false,
242                        dots: true,
243                        loop: true
244                    },
245
246                    1000: {
247                        items: 2,
248                        nav: false,
249                        dots: true,
250                        loop: true
251                    }
252
253                },
254                navText: [
255                    '<i class="fa fa-chevron-left"></i>',
256                    '<i class="fa fa-chevron-right"></i>'
257                ]
258            });
259
260        }
261
262
263
264    });
265
266
267
268    /*------------------------------rel action -----------------------------*/
269
270
271    jQuery('a[rel*=external]').click(function() {
272
273        window.open(this.href);
274
275        return false;
276
277    });
278
279
280
281
282
283
284    // jQuery(window).scroll(function() {
285    //     var value = jQuery(this).scrollTop();
286    //     if (value > 1000) {
287    //         jQuery('body').addClass('sticky_nav');
288    //         jQuery('.main-menu').addClass("fixed-top slideInDown animated");
289    //     } else {
290    //         jQuery('body').removeClass('sticky_nav');
291    //         jQuery('.main-menu').removeClass("fixed-top slideInDown animated");
292    //     }
293    // });
294
295    // stick header
296
297
298    // jQuery(window).scroll(function() {
299    //     var value = jQuery(this).scrollTop();
300    //     if (value > 600) {
301    //         jQuery('body').addClass('sticky_nav');
302    //         jQuery('.header-main').addClass("fixed-top slideInDown animated");
303    //     } else {
304    //         jQuery('body').removeClass('sticky_nav');
305    //         jQuery('.header-main').removeClass("fixed-top slideInDown animated");
306    //     }
307    // });
308
309    // var s = $(".header-main");
310    // var pos = s.position();
311    // $(window).on('scroll', function() {
312    //     var windowpos = $(window).scrollTop();
313    //     if (windowpos > 481) {
314    //         s.addClass("fixed-tops slideInDown animated");
315    //     } else {
316    //         s.removeClass("fixed-tops slideInDown animated");
317    //     }
318    // });
319
320    // search toggle
321
322    $(document).ready(function() {
323        $('.btn-search').click(function(event) {
324            event.stopPropagation();
325            $(".btn-search").toggleClass("close-icon");
326            $('.search-site').animate({
327                height: 'toggle',
328            });
329        });
330        $(".search-site").on("click", function(event) {
331            event.stopPropagation();
332        });
333    });
334
335    $(document).on("click", function(event) {
336        if (!$(event.target).hasClass('day')&&!$(event.target).hasClass('prev') && !$(event.target).hasClass('next') && !$(event.target).hasClass('month') &&!$(event.target).hasClass('datepicker-switch')) {
337            $(".btn-search").removeClass("close-icon");
338            $(".search-site").hide();
339        }
340    });
341
342
343
344    // jQuery(window).scroll(function() {
345    //     var value = jQuery(this).scrollTop();
346    //     if (value > 800) {
347    //         jQuery('body').addClass('sticky_title');
348    //         jQuery('.news-big-title').addClass("title-top slideInDown animated");
349    //     } else {
350    //         jQuery('body').removeClass('sticky_title');
351    //         jQuery('.news-big-title').removeClass("title-top slideInDown animated");
352    //     }
353    // });
354
355
356
357    // fixed video when scroll on desktop only
358    // jQuery(window).scroll(function() {
359    //     var value = jQuery(this).width();
360    //     var scrollHeight = jQuery(this).scrollTop();
361    //     if ((value > 1024) && (scrollHeight > 3000)) {
362    //         jQuery('body').addClass('video-scrolled');
363    //         jQuery('.detail-box .editor-box .embed-responsive').addClass("video-fixed");
364    //         if (!jQuery('.close-vid-btn')[0]) {
365    //             jQuery('.video-fixed').append('<span class="close-vid-btn lnr lnr-cross"></span>');
366
367    //             jQuery('.close-vid-btn').on('click', function() {
368
369    //                 $("body").removeClass('video-scrolled');
370
371    //                 $('.detail-box .editor-box .embed-responsive').addClass("video-clicked");
372    //                 $(this).removeClass('active');
373    //             })
374    //         }
375
376    //     } else {
377    //         jQuery('body').removeClass('video-scrolled');
378    //         jQuery('.detail-box .editor-box .embed-responsive').removeClass("video-fixed");
379    //         jQuery('.close-vid-btn').remove();
380    //     }
381    // });
382
383
384
385
386
387
388
389    // scrll to top
390    jQuery('.scrollToTop').click(function(e) {
391        "use strict";
392        jQuery('html,body').animate({
393            scrollTop: 0
394        }, 'slow');
395        e.preventDefault();
396        return false;
397    });
398
399    //scroll action button
400
401    // $(document).scroll(function() {
402    //     var y = $(this).width();
403    //     if (y > 1024) {
404    //         $(".upToScroll").addClass("buttonShow");
405    //     } else {
406    //         $(".upToScroll").removeClass("buttonShow");
407    //     }
408
409    // });
410
411    $(window).scroll(function() {
412        var scroll = $(window).scrollTop();
413
414        if (scroll >= 500) {
415            $(".upToScroll").addClass("buttonShow");
416        } else {
417            $(".upToScroll").removeClass("buttonShow");
418        }
419    });
420
421
422    //magnific popup gallery
423
424
425    // $(document).ready(function() {
426    //     $('.popup-gallery').magnificPopup({
427    //         delegate: 'a',
428    //         type: 'image',
429    //         tLoading: 'Loading image #%curr%...',
430    //         mainClass: 'mfp-img-mobile',
431    //         gallery: {
432    //             enabled: true,
433    //             navigateByImgClick: true,
434    //             preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
435    //         },
436    //         image: {
437    //             tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
438    //             titleSrc: function(item) {
439    //                 return item.el.attr('title');
440    //             }
441    //         }
442    //     });
443    // });
444
445
446
447    // jQuery(".popup-gallery").click(function() {
448    //     jQuery('body').addClass("fadeIn animated");
449    // });
450
451    // jQuery(".mfp-bg").click(function() {
452    //     jQuery('body').addClass("fadeOut animated").removeClass("fadeIn animated");
453
454    // });
455
456
457
458
459
460
461    //table class
462
463    jQuery("table").addClass('table table-striped').wrap("<div class='table-responsive' />");
464    // embed iframe
465
466    jQuery(".editor-box iframe").wrap("<div class='embed-responsive embed-responsive-16by9' />");
467    jQuery(".breaking-news-item iframe").wrap("<span class='embed-responsive embed-responsive-16by9' />");
468    jQuery(".video-detail iframe").wrap("<span class='embed-responsive embed-responsive-16by9' />");
469    jQuery(".featured-images iframe").wrap("<span class='embed-responsive embed-responsive-16by9' />");
470
471
472
473
474
475    // ! function() {
476    //     setTimeout(function() {
477    //         $('.preloader').css({ opacity: '0' }).one('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', function() {
478    //             $(this).hide();
479    //         });
480    //     }, 1000);
481    // }();
482
483
484    jQuery(document).ready(function($) {
485        //     //if you change this breakpoint in the style.css file (or _layout.scss if you use SASS), don't forget to update this value as well
486        //     var MQL = 240;
487
488        //     //primary navigation slide-in effect
489        //     if ($(window).width() > MQL) {
490        //         var headerHeight = $('.cd-header').height();
491        //         $(window).on('scroll', {
492        //                 previousTop: 0
493        //             },
494        //             function() {
495        //                 var currentTop = $(window).scrollTop();
496        //                 //check if user is scrolling up
497        //                 if (currentTop < this.previousTop) {
498        //                     //if scrolling up...
499        //                     if (currentTop > 0 && $('.cd-header').hasClass('is-fixed')) {
500        //                         $('.cd-header').addClass('is-visible');
501        //                     } else {
502        //                         $('.cd-header').removeClass('is-visible is-fixed');
503        //                     }
504        //                 } else {
505        //                     //if scrolling down...
506        //                     $('.cd-header').removeClass('is-visible');
507        //                     if (currentTop > headerHeight && !$('.cd-header').hasClass('is-fixed')) $('.cd-header').addClass('is-fixed');
508        //                 }
509        //                 this.previousTop = currentTop;
510        //             });
511        //     }
512
513        //open/close primary navigation
514        $('.cd-primary-nav-trigger').on('click', function() {
515            $('.cd-menu-icon').toggleClass('is-clicked');
516            $('.cd-header').toggleClass('menu-is-open');
517
518            //For firefox transitions break when parent overflow is changed, so we need to wait for the end of the trasition to give the body an overflow hidden
519            if ($('.cd-primary-nav').hasClass('is-visible')) {
520                $('.cd-primary-nav').removeClass('is-visible').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function() {
521                    $('body').removeClass('overflow-hidden');
522                });
523            } else {
524                $('.cd-primary-nav').addClass('is-visible').one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function() {
525                    $('body').addClass('overflow-hidden');
526                });
527            }
528        });
529    });
530
531    // sifaris toogle
532
533    jQuery('.sifaris-btn').on('click', function() {
534
535        $(".sifaris").css('display', 'none');
536
537    })
538
539    $(window).scroll(function() {
540        var scroll = $(window).scrollTop();
541
542        if (scroll >= 1500) {
543            //$(".sifaris").css('transform', 'translate(0,-50%)');
544            $(".sifaris").addClass('slide-left');
545
546        } else {
547            $(".sifaris").removeClass('slide-left');
548            $(".sifaris").addClass('slide-hide');
549
550        }
551    });
552
553
554
555
556
557
558
559
560    // hide slider result
561    // jQuery('.close-btn').on('click', function() {
562    //     $('.result-slideout').css("left", "-390px");
563    //     $("body").removeClass('overflow-hidden');
564    // })
565
566
567    // ! function() {
568    //     setTimeout(function() {
569    //         $('.sticky-notice').addClass('notice-pushed fadeInUp animated', function() {
570    //             $(this).show();
571    //         });
572    //     }, 8000);
573    // }();
574
575    // skip this
576
577    $('.sticky-notice').addClass("notice-pushed fadeInUp animated");
578
579    $(function() { //run when the DOM is ready
580        $(".close-button").click(function() { //use a class, since your ID gets mangled
581            $('.sticky-notice').addClass("bounceOutDown animated"); //add the class to the clicked element
582        });
583    });
584
585    // show filters
586
587    $(function() { //run when the DOM is ready
588        $(".filter-option").click(function() { //use a class, since your ID gets mangled
589            $('.filters').addClass("show-filter fadeInUp animated"); //add the class to the clicked element
590        });
591    });
592
593    // floatable form
594
595    // $('.textfield, .textarea').on('focus blur', function(e) {
596    //     $(this).parents('.fieldbox').toggleClass('focused', (e.type === 'focus' || this.value.length > 0));
597    // }).trigger('blur')
598
599
600    // on scroll show
601
602    // $(document).ready(function() {
603
604    //     /* Every time the window is scrolled ... */
605    //     $(window).scroll(function() {
606
607    //         /* Check the location of each desired element */
608    //         $('.items img').each(function(i) {
609
610    //             var bottom_of_object = $(this).offset().top + $(this).outerHeight();
611    //             var bottom_of_window = $(window).scrollTop() + $(window).height();
612
613    //             /* If the object is completely visible in the window, fade it it */
614    //             if (bottom_of_window > bottom_of_object) {
615
616    //                 $(this).animate({ 'opacity': '1' }, 500);
617
618    //             }
619
620    //         });
621
622    //     });
623
624    // });
625
626    // lazy load
627
628    // $(function() {
629    //     $('.lazy').lazy();
630    // });
631
632
633    // hide sticky footer ad
634    jQuery('.mini-btn').on('click', function() {
635        $('.sticky-footer-bigyaapan').toggleClass('sticky-ad-hide');
636
637    })
638
639    // bichar blog position setting for mobile
640
641
642    $(document).ready(function() {
643
644        var deviceWidth = jQuery(this).width();
645        if (deviceWidth < 576) {
646            $(".right-side .bichar-mobile").insertBefore(".section.photo-section") && jQuery(".bichar-mobile, .for-mobile").wrap("<div class='right-side only-mobile' />");
647            //$(".left-side.sif.col-md-2").insertAfter('.get-news-alert');
648        }
649
650    });
651    // $(document).ready(function() {
652
653    //     var deviceWidth = jQuery(this).width();
654    //     if (deviceWidth < 768) {
655    //         $(".left-side.sif .sif-left").insertAfter('.comment-box');
656    //     }
657    // });
658
659    // sifaris height setting
660    // $(document).ready(function() {
661    //     var divHeight = $('.embed-responsive').height();
662    //     $('.sifaris-list').css('height', divHeight + 'px');
663    // });
664
665    window.onscroll = function() {
666        myFunction();
667    };
668
669    var div = document.querySelector(".new-header-box");
670    var offset = div.offsetTop + 50;
671
672    function myFunction() {
673        if (window.pageYOffset > offset) {
674        div.classList.add("sticky");
675        } else {
676        div.classList.remove("sticky");
677        }
678    }
679
680})(jQuery);

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.