PageSourceSearch

https://kstu.uz/frontend/assets/js/custom.js

js kstu.uz collected 2026-10-07 13:13:39 UTC 8,873 bytes, 323 lines download raw bytes

1(function($) {
2    'use strict';
3
4    // Mean Menu JS
5    jQuery('.mean-menu').meanmenu({
6        meanScreenWidth: "991"
7    });
8
9    // Navbar Area
10    $(window).on('scroll', function() {
11        if ($(this).scrollTop() >150){
12            $('.navbar-area').addClass("sticky-nav");
13        }
14        else{
15            $('.navbar-area').removeClass("sticky-nav");
16        }
17    });
18
19    // Search Overlay JS
20	$(".nav-side .search-box i").on("click", function(){
21		$(".search-overlay").toggleClass("search-overlay-active");
22	});
23	$(".search-close").on("click", function(){
24		$(".search-overlay").removeClass("search-overlay-active");
25    });
26
27    // Others Option For Responsive JS
28	$(".side-nav-responsive .dot-menu").on("click", function(){
29		$(".side-nav-responsive .container-max .container").toggleClass("active");
30    });
31
32    // Banner Slider
33    $('.banner-slider').owlCarousel({
34        loop: true,
35        margin: 30,
36        nav: false ,
37        items: 1,
38        dots: true,
39        autoplay: true,
40        autoHeight: true,
41        autoplayHoverPause: true,
42    })
43
44    // Case Study Slider
45    $('.case-study-slider').owlCarousel({
46        loop: true,
47        margin: 30,
48        nav: false,
49        dots: false,
50        center: true,
51        autoplay: true,
52        autoplayHoverPause: true,
53        responsive:{
54            0:{
55                items: 1
56            },
57            600:{
58                items: 2
59            },
60            1024:{
61                items: 3
62            },
63            1200:{
64                items: 4
65            },
66        },
67    })
68
69    // Brand Slider
70    $('.brand-slider').owlCarousel({
71        loop: true,
72        margin: 60,
73        nav: false,
74        dots: false,
75        autoplay: true,
76        autoplayHoverPause: true,
77        responsive:{
78            0:{
79                items: 2
80            },
81            600:{
82                items: 2
83            },
84            700:{
85                items: 3
86            },
87            1024:{
88                items: 5
89            }
90        },
91    })
92
93    // Clients Slider
94    $('.clients-slider').owlCarousel({
95        loop: true,
96        margin: 30,
97        nav: true,
98        dots: false,
99        autoplay: true,
100        autoplayHoverPause: true,
101        responsive:{
102            0:{
103                items: 1
104            },
105            992:{
106                items: 2
107            }
108        },
109        navText: [
110            "<i class='bx bx-chevron-left'></i>",
111            "<i class='bx bx-chevron-right'></i>"
112        ],
113    })
114
115    // Clients Slider
116    $('.clients-slider-two').owlCarousel({
117        loop: true,
118        margin: 30,
119        nav: true,
120        dots: false,
121        autoplay: true,
122        autoplayHoverPause: true,
123        items: 1,
124        navText: [
125            "<i class='bx bx-chevron-left'></i>",
126            "<i class='bx bx-chevron-right'></i>"
127        ],
128    })
129
130    // Banner Sub Slider
131    $('.banner-sub-slider').owlCarousel({
132        loop: true,
133        margin: 30,
134        nav: false,
135        dots: false,
136        autoplay: true,
137        autoplayHoverPause: true,
138        responsive:{
139            0:{
140                items: 1
141            },
142            1024:{
143                items: 3
144            }
145        },
146    })
147
148    // Popup Video
149    $('.popup-btn').magnificPopup({
150        disableOn: 320,
151        type: 'iframe',
152        mainClass: 'mfp-fade',
153        removalDelay: 160,
154        preloader: false,
155        fixedContentPos: false
156    });
157
158    // Nice Select JS
159    $('select').niceSelect();
160
161    // FAQ Accordion JS
162	$('.accordion').find('.accordion-title').on('click', function(){
163		// Adds Active Class
164		$(this).toggleClass('active');
165		// Expand or Collapse This Panel
166		$(this).next().slideToggle('fast');
167		// Hide The Other Panels
168		$('.accordion-content').not($(this).next()).slideUp('fast');
169		// Removes Active Class From Other Titles
170		$('.accordion-title').not($(this)).removeClass('active');
171    });
172
173    // Skill-bar JS
174    $(".skill-bar").each(function () {
175        $(this).find(".progress-content").animate({ width: $(this).attr("data-percentage") }, 2000);
176        $(this).find(".progress-number-mark").animate({ left: $(this).attr("data-percentage") },
177            {
178                duration: 2000,
179                step: function (now, fx) {
180                    var data = Math.round(now);
181                    $(this)
182                        .find(".percent")
183                        .html(data + "%");
184                },
185            }
186        );
187    });
188
189    // WOW JS
190    new WOW().init();
191
192    // Preloader JS
193    $(window).on('load',function(){
194        $(".preloader").fadeOut(500);
195    });
196
197    // Back To Top
198    $('body').append("<div class='go-top'><i class='bx bx-chevrons-up'></i></div>");
199    $(window).on('scroll', function() {
200        var scrolled = $(window).scrollTop();
201        if (scrolled > 600) $('.go-top').addClass('active');
202        if (scrolled < 600) $('.go-top').removeClass('active');
203    });
204    $('.go-top').on('click', function() {
205        $('html, body').animate({
206            scrollTop: '0',
207        }, 50 );
208    });
209
210    // Count Time JS
211	function makeTimer() {
212		var endTime = new Date("December 30, 2022 17:00:00 PDT");
213		var endTime = (Date.parse(endTime)) / 1000;
214		var now = new Date();
215		var now = (Date.parse(now) / 1000);
216		var timeLeft = endTime - now;
217		var days = Math.floor(timeLeft / 86400);
218		var hours = Math.floor((timeLeft - (days * 86400)) / 3600);
219		var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60);
220		var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60)));
221		if (hours < "10") { hours = "0" + hours; }
222		if (minutes < "10") { minutes = "0" + minutes; }
223		if (seconds < "10") { seconds = "0" + seconds; }
224		$("#days").html(days + "<span>Days</span>");
225		$("#hours").html(hours + "<span>Hours</span>");
226		$("#minutes").html(minutes + "<span>Minutes</span>");
227		$("#seconds").html(seconds + "<span>Seconds</span>");
228	}
229    setInterval(function() { makeTimer(); }, 300);
230
231    // Subscribe form
232    $(".newsletter-form").validator().on("submit", function (event) {
233        if (event.isDefaultPrevented()) {
234            // Handle The Invalid Form...
235            formErrorSub();
236            submitMSGSub(false, "Please enter your email correctly");
237        } else {
238            // Everything Looks Good!
239            event.preventDefault();
240        }
241    });
242    function callbackFunction (resp) {
243        if (resp.result === "success") {
244            formSuccessSub();
245        }
246        else {
247            formErrorSub();
248        }
249    }
250    function formSuccessSub(){
251        $(".newsletter-form")[0].reset();
252        submitMSGSub(true, "Thank you for subscribing!");
253        setTimeout(function() {
254            $("#validator-newsletter").addClass('hide');
255        }, 4000)
256    }
257    function formErrorSub(){
258        $(".newsletter-form").addClass("animated shake");
259        setTimeout(function() {
260            $(".newsletter-form").removeClass("animated shake");
261        }, 1000)
262    }
263    function submitMSGSub(valid, msg){
264        if(valid){
265            var msgClasses = "validation-success";
266        } else {
267            var msgClasses = "validation-danger";
268        }
269        $("#validator-newsletter").removeClass().addClass(msgClasses).text(msg);
270    }
271
272    // AJAX MailChimp
273    $(".newsletter-form").ajaxChimp({
274        url: "https://envyTheme.us20.list-manage.com/subscribe/post?u=60e1ffe2e8a68ce1204cd39a5&amp;id=42d6d188d9", // Your url MailChimp
275        callback: callbackFunction
276    });
277
278})(jQuery);
279
280// function to set a given theme/color-scheme
281function setTheme(themeName) {
282    localStorage.setItem('theme', themeName);
283    document.documentElement.className = themeName;
284}
285
286// function to toggle between light and dark theme
287function toggleTheme() {
288    if (localStorage.getItem('theme') === 'theme-dark') {
289        setTheme('theme-light');
290    } else {
291        setTheme('theme-dark');
292    }
293}
294
295// Immediately invoked function to set the theme on initial load
296(function () {
297    if (localStorage.getItem('theme') === 'theme-dark') {
298        setTheme('theme-dark');
299        document.getElementById('slider').checked = false;
300    } else {
301        setTheme('theme-light');
302      document.getElementById('slider').checked = true;
303    }
304})();
305
306
307// Element mavjudligini tekshirish
308var langgElement = document.getElementById('langgg');
309if (langgElement) {
310    langgElement.addEventListener('change', function() {
311        val = $("#SelectOption").val();
312        console.log(val);
313        if(val === 'http://laravel.loc/en') {
314            window.open('home.php','_blank');
315        }
316        if(val === 'http://laravel.loc/uz') {
317            window.open('contact.php', '_blank');
318        }
319        if (val === 'http://laravel.loc/ru') {
320            window.open('sitemap.php', '_blank');
321        }
322    });
323}

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.