PageSourceSearch

https://www.deluxevietnamtours.com/js/main.js

js deluxevietnamtours.com collected 2026-10-07 15:44:13 UTC 2,414 bytes, 75 lines download raw bytes

1(function ($) {
2    "use strict";
3    
4    // 1. Thả menu khi di chuột (Dropdown Hover)
5    $(document).ready(function () {
6        function toggleNavbarMethod() {
7            if ($(window).width() > 992) {
8                $('.navbar .dropdown').on('mouseover', function () {
9                    $('.dropdown-toggle', this).trigger('click');
10                }).on('mouseout', function () {
11                    $('.dropdown-toggle', this).trigger('click').blur();
12                });
13            } else {
14                $('.navbar .dropdown').off('mouseover').off('mouseout');
15            }
16        }
17        toggleNavbarMethod();
18        $(window).resize(toggleNavbarMethod);
19    });
20    
21    
22    // 2. Nút cuộn lên đầu trang (Back to top)
23    $(window).scroll(function () {
24        if ($(this).scrollTop() > 100) {
25            $('.back-to-top').fadeIn('slow');
26        } else {
27            $('.back-to-top').fadeOut('slow');
28        }
29    });
30    $('.back-to-top').click(function () {
31        $('html, body').animate({scrollTop: 0}, 1500, 'easeInOutExpo');
32        return false;
33    });
34
35
36    // 3. Bộ chọn ngày giờ (Datetimepicker)
37    // KIỂM TRA: Chỉ chạy khi thư viện tồn tại VÀ trên trang có phần tử cần dùng
38    if (typeof $.fn.datetimepicker === "function" && ($('.date').length || $('.time').length)) {
39        $('.date').datetimepicker({
40            format: 'L'
41        });
42        $('.time').datetimepicker({
43            format: 'LT'
44        });
45    }
46
47
48    // 4. Slider đánh giá cũ (Testimonials Carousel)
49    // KIỂM TRA: Chỉ chạy trên các trang cũ CÓ thẻ phần tử .testimonial-carousel VÀ có nhúng thư viện OwlCarousel
50    if ($('.testimonial-carousel').length && typeof $.fn.owlCarousel === "function") {
51        $(".testimonial-carousel").owlCarousel({
52            autoplay: true,
53            smartSpeed: 1500,
54            margin: 30,
55            dots: true,
56            loop: true,
57            center: true,
58            responsive: {
59                0:{
60                    items:1
61                },
62                576:{
63                    items:1
64                },
65                768:{
66                    items:2
67                },
68                992:{
69                    items:3
70                }
71            }
72        });
73    }
74    
75})(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.