PageSourceSearch

https://vietcago.xyz/assets-home/js/script.js

js vietcago.xyz collected 2026-10-08 11:49:30 UTC 7,320 bytes, 272 lines download raw bytes

1"use strict";
2
3
4/* ===================================
5        Loading Timeout
6 ====================================== */
7
8$(window).on('load', function () {
9    $('.side-menu').removeClass('hidden');
10    // Animate loader off screen
11    $("#loader-fade").fadeOut(800);});
12
13var $window = $(window);
14var windowsize = $(window).width();
15
16/*------ Menu Fixed ------*/
17
18if ($("nav.navbar").hasClass("static-nav")) {
19    $window.scroll(function () {
20        var $scroll = $window.scrollTop();
21        var $navbar = $(".static-nav");
22        if ($scroll > 200) {
23            $navbar.addClass("fixedmenu");
24        } else {
25            $navbar.removeClass("fixedmenu");
26        }
27    });
28}
29
30/*------ Bottom Menu Fix ------*/
31
32if ($("nav.navbar").hasClass("fixed-bottom")) {
33    var navHeight = $(".fixed-bottom").offset().top;
34    $window.scroll(function () {
35        if ($window.scrollTop() > navHeight) {
36            $('.fixed-bottom').addClass('fixedmenu');
37        } else {
38            $('.fixed-bottom').removeClass('fixedmenu');
39        }
40    });
41}
42
43/*===================================
44    Go Top Scroll
45====================================== */
46
47$(function(){
48    // Scroll Event
49    $(window).on('scroll', function(){
50        var scrolled = $(window).scrollTop();
51        if (scrolled > 600) $('.go-top').addClass('active');
52        if (scrolled < 600) $('.go-top').removeClass('active');
53    });
54    // Click Event
55    $('.go-top').on('click', function() {
56        $("html, body").animate({ scrollTop: "0" },  500);
57    });
58});
59
60/* Hide Menu on Mobile Click */
61
62$(".navbar-nav>li>a").on("click", function(){
63    $(".navbar-collapse").collapse("hide");
64});
65
66// scroll section
67$(".scroll").on("click", function (event) {
68    event.preventDefault();
69    $("html,body").animate({
70        scrollTop: $(this.hash).offset().top - 70
71    }, 1200);
72});
73
74/* ===================================
75    Side Menu
76====================================== */
77if ($("#sidemenu_toggle").length) {
78    $("#sidemenu_toggle").on("click", function () {
79        $(".pushwrap").toggleClass("active");
80        $(".side-menu").addClass("side-menu-active"), $("#close_side_menu").fadeIn(700)
81    }), $("#close_side_menu").on("click", function () {
82        $(".side-menu").removeClass("side-menu-active"), $(this).fadeOut(200), $(".pushwrap").removeClass("active")
83    }), $(".side-nav .navbar-nav .nav-link").on("click", function () {
84        $(".side-menu").removeClass("side-menu-active"), $("#close_side_menu").fadeOut(200), $(".pushwrap").removeClass("active")
85    }), $("#btn_sideNavClose").on("click", function () {
86        $(".side-menu").removeClass("side-menu-active"), $("#close_side_menu").fadeOut(200), $(".pushwrap").removeClass("active")
87    });
88}
89
90if($(".just-sidemenu").length){
91    var anchor_point = $(".rotating-words").height();
92    var side_toggle = $(".just-sidemenu #sidemenu_toggle");
93    side_toggle.addClass("toggle_white");
94    $window.on("scroll", function () {
95        if ($window.scrollTop() >= anchor_point) {
96            side_toggle.removeClass("toggle_white");
97        } else {
98            side_toggle.addClass("toggle_white");
99        }
100    });
101}
102
103/* ===================================
104    WOW JS
105====================================== */
106
107new WOW().init();
108
109/* ===================================
110     Products Carousel
111====================================== */
112
113$(".owl-products").owlCarousel({
114    items: 5,
115    dots: false,
116    nav: false,
117    loop: true,
118    center:true,
119    autoplay: true,
120    autoplayHoverPause:true,
121    slideSpeed: 3000,
122    paginationSpeed: 5000,
123    smartSpeed:1000,
124    responsive: {
125        992: {
126            items: 3
127        },
128        600: {
129            items: 3
130        },
131        320: {
132            items: 1
133        },
134        280: {
135            items: 1
136        }
137    }
138});
139
140var owl = $('.owl-products');
141owl.owlCarousel();
142$('#team-circle-left').click(function () {
143    owl.trigger('prev.owl.carousel');
144});
145
146$('#team-circle-right').click(function () {
147    owl.trigger('next.owl.carousel');
148});
149
150/* ===================================
151     Review Carousel
152====================================== */
153
154$('#testimonial-carousal').owlCarousel({
155    loop:true,
156    margin:20,
157    nav:false,
158    dots:false,
159    autoplay:true,
160    responsive:{
161        0:{
162            items:1
163        },
164        600:{
165            items:2
166        },
167        1000:{
168            items:3
169        }
170    }
171});
172
173/* ===================================
174     Counter
175====================================== */
176
177$('.count').each(function () {
178    $(this).appear(function () {
179        $(this).prop('Counter', 0).animate({
180            Counter: $(this).text()
181        }, {
182            duration: 3000,
183            easing: 'swing',
184            step: function (now) {
185                $(this).text(Math.ceil(now));
186            }
187        });
188    });
189});
190
191/* ===================================
192     Modal Windows
193====================================== */
194
195function morphic_window(x) {
196    openmodal(x);
197}
198
199function openmodal(x){
200    setTimeout(function(){$('#'+x).addClass("modal-view").fadeIn(800);},50);
201    setTimeout(function(){$('body').addClass('show-modal').fadeIn(800);},50);
202}
203
204$('#data-modal').on('click','.close-modal',function(){
205    $(".modal-window").removeClass("modal-view");
206    $('body').removeClass('show-modal');
207    $('.body').removeClass('body-overlay');
208});
209
210$('#data-modal').on('click','.modal-window',function(event){
211    var i=event.target.id;
212    var x=event.target.className;
213    var v=x.split(" ");
214    var c=v[0];
215    if(c=="modal-window"){
216        $(".modal-window").removeClass("modal-view");
217        $('.body').removeClass('body-overlay');
218        $('body').removeClass('show-modal');
219    }
220    else{
221    }
222});
223
224//Prev_window
225function prev_window(x){
226    $('.body').addClass('body-overlay');
227    $(".modal-window").removeClass("modal-view");
228    $(".loader").addClass('load');
229    setTimeout(function () {
230        $(".loader").fadeOut(800);
231    },1000);
232    setTimeout(function(){ $("#"+x).addClass("modal-view").fadeIn(800); }, 800);
233    setTimeout(function(){ $(".loader").removeClass('load'); }, 800);
234}
235
236//Next_window
237function next_window(x){
238    $('.body').addClass('body-overlay');
239    $(".modal-window").removeClass("modal-view");
240    $(".loader").addClass('load');
241    setTimeout(function () {
242        $(".loader").fadeOut(800);
243    },1000);
244    setTimeout(function(){ $("#"+x).addClass("modal-view").fadeIn(800); }, 800);
245    setTimeout(function(){ $(".loader").removeClass('load'); }, 800);
246}
247
248/*===================================
249         Number input counter
250 ======================================*/
251$(document).ready(function() {
252    $('.minus').click(function () {
253        var $input = $(this).parent().find('input');
254        var count = parseInt($input.val()) - 1;
255        count = count < 1 ? 1 : count;
256        $input.val(count);
257        $input.change();
258        return false;
259    });
260    $('.plus').click(function () {
261        var $input = $(this).parent().find('input');
262        $input.val(parseInt($input.val()) + 1);
263        $input.change();
264        return false;
265    });
266
267    $('.size__item>a').css('opacity','0.4');
268    $('.size__item>a').on('click',function () {
269        $('.size__item>a').css('opacity','0.4');
270        $(this).css('opacity','1');
271    });
272});

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.