PageSourceSearch

https://tcvn.gov.vn/wp-content/themes/Tcvn/asset/js/front-page.js

js tcvn.gov.vn collected 2026-09-24 09:37:18 UTC 7,421 bytes, 130 lines download raw bytes

1(function() {
2    'use strict';
3
4    function jssor_1_slider_init() {
5
6        var jssor_SlideshowTransitions = [
7            {$Duration:800,x:0.3,$During:{$Left:[0.3,0.7]},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
8            {$Duration:800,x:-0.3,$SlideOut:true,$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
9            {$Duration:800,x:-0.3,$During:{$Left:[0.3,0.7]},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
10            {$Duration:800,x:0.3,$SlideOut:true,$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
11            {$Duration:800,y:0.3,$During:{$Top:[0.3,0.7]},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
12            {$Duration:800,y:-0.3,$SlideOut:true,$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
13            {$Duration:800,y:-0.3,$During:{$Top:[0.3,0.7]},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
14            {$Duration:800,y:0.3,$SlideOut:true,$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
15            {$Duration:800,x:0.3,$Cols:2,$During:{$Left:[0.3,0.7]},$ChessMode:{$Column:3},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
16            {$Duration:800,x:0.3,$Cols:2,$SlideOut:true,$ChessMode:{$Column:3},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
17            {$Duration:800,y:0.3,$Rows:2,$During:{$Top:[0.3,0.7]},$ChessMode:{$Row:12},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
18            {$Duration:800,y:0.3,$Rows:2,$SlideOut:true,$ChessMode:{$Row:12},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
19            {$Duration:800,y:0.3,$Cols:2,$During:{$Top:[0.3,0.7]},$ChessMode:{$Column:12},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
20            {$Duration:800,y:-0.3,$Cols:2,$SlideOut:true,$ChessMode:{$Column:12},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
21            {$Duration:800,x:0.3,$Rows:2,$During:{$Left:[0.3,0.7]},$ChessMode:{$Row:3},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
22            {$Duration:800,x:-0.3,$Rows:2,$SlideOut:true,$ChessMode:{$Row:3},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
23            {$Duration:800,x:0.3,y:0.3,$Cols:2,$Rows:2,$During:{$Left:[0.3,0.7],$Top:[0.3,0.7]},$ChessMode:{$Column:3,$Row:12},$Easing:{$Left:$Jease$.$InCubic,$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
24            {$Duration:800,x:0.3,y:0.3,$Cols:2,$Rows:2,$During:{$Left:[0.3,0.7],$Top:[0.3,0.7]},$SlideOut:true,$ChessMode:{$Column:3,$Row:12},$Easing:{$Left:$Jease$.$InCubic,$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
25            {$Duration:800,$Delay:20,$Clip:3,$Assembly:260,$Easing:{$Clip:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
26            {$Duration:800,$Delay:20,$Clip:3,$SlideOut:true,$Assembly:260,$Easing:{$Clip:$Jease$.$OutCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
27            {$Duration:800,$Delay:20,$Clip:12,$Assembly:260,$Easing:{$Clip:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
28            {$Duration:800,$Delay:20,$Clip:12,$SlideOut:true,$Assembly:260,$Easing:{$Clip:$Jease$.$OutCubic,$Opacity:$Jease$.$Linear},$Opacity:2}
29        ];
30
31        var jssor_options = {
32            $AutoPlay: 1,
33            $Align: 0,
34            $SlideshowOptions: {
35                $Class: $JssorSlideshowRunner$,
36                $Transitions: jssor_SlideshowTransitions,
37                $TransitionsOrder: 1
38            },
39            $BulletNavigatorOptions: {                          //[Optional] Options to specify and enable navigator or not
40                $Class: $JssorBulletNavigator$,                 //[Required] Class to create navigator instance
41                $ChanceToShow: 2,                               //[Required] 0 Never, 1 Mouse Over, 2 Always
42                $Rows: 1,                                      //[Optional] Specify lanes to arrange items, default value is 1
43                $SpacingX: 10,                                  //[Optional] Horizontal space between each item in pixel, default value is 0
44                $SpacingY: 0                                   //[Optional] Vertical space between each item in pixel, default value is 0
45            },
46
47            $ArrowNavigatorOptions: {
48                $Class: $JssorArrowNavigator$,                  //[Requried] Class to create arrow navigator instance
49                $ChanceToShow: 2                                //[Required] 0 Never, 1 Mouse Over, 2 Always
50            },
51
52            $ThumbnailNavigatorOptions: {
53                $Class: $JssorThumbnailNavigator$,
54                $Cols: 6,
55                $Orientation: 2,
56                $Align: 156,
57                $HWA: false
58            }
59        };
60
61        var jssor_1_slider = new $JssorSlider$("slider1_container", jssor_options);
62
63        /*#region responsive code begin*/
64
65        var MAX_WIDTH = 736;
66
67        function ScaleSlider() {
68            var containerElement = jssor_1_slider.$Elmt.parentNode;
69            var containerWidth = containerElement.clientWidth;
70
71            if (containerWidth) {
72                console.log('Container width: ', jQuery('.container')[0].width);
73                var expectedWidth = Math.min(MAX_WIDTH || containerWidth, containerWidth);
74                if (containerWidth < 855) {
75                    // expectedWidth = expectedWidth - 30;
76                }
77
78                jssor_1_slider.$ScaleWidth(expectedWidth);
79            }
80            else {
81                window.setTimeout(ScaleSlider, 30);
82            }
83        }
84
85        ScaleSlider();
86
87        $Jssor$.$AddEvent(window, "load", ScaleSlider);
88        $Jssor$.$AddEvent(window, "resize", ScaleSlider);
89        $Jssor$.$AddEvent(window, "orientationchange", ScaleSlider);
90        /*#endregion responsive code end*/
91    };
92
93    jssor_1_slider_init();
94
95
96})();
97
98/*************** THONG BAO *****************/
99var liNum = 1, maxLi = 0;
100var timerID;
101function scrollLi() {
102    // reset
103    if (liNum >= maxLi) {
104        jQuery('#thongbao-container ul').animate({scrollTop: 0}, 1000);
105        liNum = 1;
106    } else {
107        var y = jQuery('#thongbao-container ul li:nth-child(' + liNum + ')').outerHeight(true);
108        liNum++;
109        y += jQuery('#thongbao-container ul li:nth-child(' + liNum + ')').outerHeight(true);
110        liNum++;
111        jQuery('#thongbao-container ul').animate({scrollTop: jQuery('#thongbao-container ul').scrollTop() + y}, 1500);
112    }
113}
114jQuery(function() {
115   timerID = setInterval(scrollLi, 2500);
116   maxLi = jQuery('#thongbao-container ul li').length;
117});
118
119/*************** JSSOR CLICK TO EXPAND *******************/
120jQuery("#header_menu ul > li > ul > li.menu-item-has-children > a").unbind('click').bind('click', function(e) {
121    console.log('Event occur!');
122    console.log(jQuery(this).parent("li").parent("ul"));
123    e.preventDefault();
124    jQuery(this).parent("li").parent("ul").addClass("show"); // Keep showing
125    jQuery(this).next('ul.dropdown-menu').toggleClass("show"); // <<< line added
126});
127
128jQuery('#search_button i.fa-search').click(function() {
129    jQuery('#search_text').show();
130});

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.