PageSourceSearch

https://yanginstitute.com/wp-content/themes/yanginstitute/js/scripts.js?ver=1.0.0

js yanginstitute.com collected 2026-10-04 02:56:32 UTC 7,374 bytes, 250 lines download raw bytes

1(function ($) {
2    $(document).ready(function () {
3        $('#searchsubmit, #commentform #submit').addClass('btn btn-default');
4        $('button, html input[type="button"], input[type="reset"], input[type="submit"]').addClass('btn btn-default');
5        $('input:not(button, html input[type="button"], input[type="reset"], input[type="submit"]), input[type="file"], select, textarea').addClass('form-control');
6        if ($('label').parent().not('div')) {
7            $('label:not(#searchform label,#commentform label)').wrap('<div></div>');
8        }
9        $('table').addClass('table table-bordered');
10        $('.attachment-thumbnail').addClass('thumbnail');
11        //$('embed-responsive-item,iframe,embed,object,video').parent().addClass('embed-responsive embed-responsive-16by9');
12        $('.navbar-nav').addClass('blog-nav');
13        $('.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus').closest('.navbar-nav').removeClass('blog-nav');
14    });
15    // init function
16    initBgCover();
17
18
19    // background cover
20    function initBgCover(context) {
21        if (!context) context = jQuery('body');
22        context.find('.bg-cover').each(function () {
23            var holder = jQuery(this);
24            var image = holder.find('> img').hide();
25            var imageSrc = image.prop('src');
26            holder.css({
27                backgroundImage: 'url(' + imageSrc + ')',
28            });
29        });
30    }
31
32
33    //objectFitInit
34    objectFitImages();
35
36
37    // revies-block Slider
38    $('.revies-block__slider').slick({
39        slidesToShow: 1,
40        slidesToScroll: 1,
41        dots: false,
42        focusOnSelect: true,
43        arrows: true,
44        adaptiveHeight: true
45       
46    });
47
48
49    $slide_display = $('.site-banner__slider').attr('data-display');
50
51	$(window).load(function() {
52		// Force slider to have slides that are all the same height
53		var slideHeight = $('.site-banner__slider .slick-track').height();
54		$('.site-banner__slider .slick-slide').css('height', slideHeight + 'px' );
55	});
56
57    // // site-banner__slider
58    $('.site-banner__slider').slick({
59        slidesToShow: $slide_display,
60        slidesToScroll: 1,
61        dots: false,
62        focusOnSelect: true,
63        arrows: true,
64        responsive: [{
65            breakpoint: 992,
66            settings: {
67                arrows: false,
68                dots: true,
69                slidesToShow: 1,
70                slidesToScroll: 1,
71            },
72        }, ],
73    });
74
75
76    // testimonial-block__slider
77    $('.testimonial-block__slider').slick({
78        slidesToShow: 1,
79        slidesToScroll: 1,
80        dots: false,
81        focusOnSelect: true,
82        arrows: false,
83        //adaptiveHeight: true,
84        responsive: [{
85            breakpoint: 992,
86            settings: {
87                arrows: false,
88                dots: false,
89            },
90        }, ],
91    });
92
93
94    // testimonial-block__slider
95    $('.testimonial-slider').slick({
96        slidesToShow: 1,
97        slidesToScroll: 1,
98        dots: false,
99        arrows: true,
100        nextArrow: '<span class="icon-right-arrow next-arrow"></span>',
101        prevArrow: '<span class="icon-right-arrow prev-arrow"></span>',
102        focusOnSelect: true,
103        responsive: [{
104            breakpoint: 992,
105            settings: {
106                arrows: true,
107            },
108        }, ],
109    });
110
111
112    // Program Slider
113
114
115    $('.program-slider').slick({
116        slidesToShow: 3,
117        slidesToScroll: 1,
118        dots: false,
119        arrows: true,
120        nextArrow: '<span class="icon-right-arrow next-arrow"></span>',
121        prevArrow: '<span class="icon-right-arrow prev-arrow"></span>',
122        focusOnSelect: true,
123        responsive: [{
124            breakpoint: 992,
125            settings: {
126                arrows: true,
127                slidesToShow: 2,
128            },
129        },
130        {
131            breakpoint: 600,
132            settings: {
133                arrows: true,
134                slidesToShow: 1,
135            },
136        }, ],
137    });
138
139
140    // video-gallery slider
141    $('.video-gallery__slider').slick({
142        slidesToShow: 4,
143        slidesToScroll: 1,
144        dots: false,
145        focusOnSelect: true,
146        arrows: true,
147        responsive: [{
148                breakpoint: 1200,
149                settings: {
150                    slidesToShow: 3,
151                    arrows: false,
152                    dots: true,
153                },
154            },
155            {
156                breakpoint: 992,
157                settings: {
158                    slidesToShow: 2,
159                    arrows: false,
160                    dots: true,
161                },
162            },
163            {
164                breakpoint: 576,
165                settings: {
166                    slidesToShow: 1,
167                    arrows: false,
168                    dots: true,
169                },
170            }
171        ],
172    });
173
174
175    // fancybox
176    $(".fancybox").fancybox({
177        openEffect: "none",
178        closeEffect: "none",
179    });
180
181
182    //sticky-header
183    $(window).scroll(function () {
184        jQuery(window).scrollTop() > 0 ?
185            $(".site-header__v3").addClass("sticky-header") :
186            $(".site-header__v3").removeClass("sticky-header");
187    });
188
189
190    //Search form Toggle
191    $('.top-menu .icon-search-alt').click(function () {
192        $('#search-container').slideToggle();
193        $('.search').toggleClass('open');
194    })
195
196
197    // Footer Custom Toggle
198    jQuery('.toggleBtn').click(function () {
199        if (screen.width < 576) {
200            jQuery('.toggleBtn').not(this).siblings().slideUp();
201            jQuery(this).toggleClass('active');
202            jQuery('.toggleBtn').not(this).removeClass('active');
203            jQuery(this).siblings().slideToggle();
204        }
205    });
206
207
208    // js for accordian icon
209    function toggleIcon(e) {
210        $(e.target)
211            .prev('.panel-heading')
212            .find(".more-less")
213            .toggleClass('glyphicon-plus glyphicon-minus');
214    }
215    $('.panel-group').on('hidden.bs.collapse', toggleIcon);
216    $('.panel-group').on('shown.bs.collapse', toggleIcon);
217
218
219    /* smooth scroll*/
220    $('a.js-has-smooth[href*="#"]:not([href="#"])').click(function () {
221        if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
222            var target = $(this.hash);
223            target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
224            if (target.length) {
225                $('html, body').animate({
226                    scrollTop: target.offset().top - 100
227                }, 1000);
228                return false;
229            }
230        }
231    });
232
233
234    //Active state on conditions-nav__link
235    $('.conditions-nav__link').click(function () {
236        if ($(this).hasClass('active')) {
237            $('.conditions-nav__link').removeClass('active');
238        } else {
239            $('.conditions-nav__link').removeClass('active');
240            $(this).addClass('active');
241        }
242    });
243
244
245    $('.conditions-offer .btn-close').click(function () {
246        $('.conditions-offer').css("display", "none");
247    })
248
249
250})(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.