PageSourceSearch

https://www.fuxin.gov.cn/khcs/template//js/about.js?v=1.4

js fuxin.gov.cn collected 2026-10-02 14:43:41 UTC 6,446 bytes, 199 lines download raw bytes

1/* 页面交互效果 */
2
3(function (win, $) {
4
5    function loadTimeout() {
6        //超时秒数
7        var second = 10,
8            //计时器
9            timer = setInterval(function () {
10                if (--second < 1) {
11                    document.getElementById('preview').innerHTML = '您当前的网络连接过慢!';
12                    clearInterval(timer)
13                }
14            }, 1000);
15        //注册事件
16        document.attachEvent ? document.attachEvent('onreadystatechange', CtrlLoad) : document.onreadystatechange = CtrlLoad;
17        //控制加载
18        function CtrlLoad() {
19            if (document.readyState && ('complete' == document.readyState)) {
20                document.getElementById('preview').style.display = 'none';
21                clearInterval(timer);
22            }
23        }
24    }
25    //调用
26    loadTimeout();
27}(this, jQuery));
28//
29(function (win, $) {
30    var timer;
31    $('#fullpage').fullpage({
32        sectionsColor: ['', '#eeeeee', '#eeeeee', '#eeeeee', '#eeeeee', '#eeeeee', '#eeeeee', "#eeeeee", "#eeeeee"],
33        anchors: ['page1', 'page2', 'page3', 'page4', 'page5', 'page6', 'page7', 'page8', 'page9'],
34        menu: '#menu',
35        sectionSelector: '.ewb-section',
36        scrollingSpeed: 500,
37        // 滚动到某一屏后的回调函数
38        afterLoad: function (anchorLink, index) {
39            // 顶部楼层导航样式
40            if (index != 1) {
41                $(".ewb-top").addClass("whitecolor");
42                $(".ewb-menu-link").addClass("blackcolor");
43                // $(".ewb-logo1").addClass("none");
44                $(".ewb-logo2").removeClass("none");
45                $(".ewb-first").addClass("none");
46
47            } else {
48                $(".ewb-top").removeClass("whitecolor");
49                $(".ewb-menu-link").removeClass("blackcolor");
50                // $(".ewb-logo1").removeClass("none");
51                $(".ewb-logo2").addClass("none");
52                $(".ewb-first").removeClass("none");
53            }
54
55            // 阜新经济从左到右滚动效果
56            if (index == 3) {
57                startKD = 15;
58                clearTimeout(timer);
59                initAutoScroll(startKD);
60            }
61
62        },
63        //滚动前的回调函数
64        onLeave: function (index, nextIndex, direction) {
65            // 进入此页前就执行方法
66            if (nextIndex == 2) {
67                $(".ewb-invest").addClass("ewb-invest-animate");
68            } else {
69                $(".ewb-invest").removeClass("ewb-invest-animate");
70            }
71            // 离开此页时清除定时器
72            if (index == 2) {
73                clearTimeout(timer);
74            }
75
76        },
77    });
78  // 第一屏
79    $('body').vidbacking({
80        'masked': true
81    });
82    /* 定义变量 */
83    var startKD = 15,
84        endKD = 885;
85
86    /* 初始化自动滚动(定时) */
87    function initAutoScroll(param) {
88        param++;
89        if (param < endKD) {
90            dragInfo(param);
91            timer = setTimeout(function () { initAutoScroll(param) }, 50);
92        }
93    }
94
95    // 阜新经济
96    var leftPx = 0,
97        totalCount = $(".ewb-agenda-imgitem").find("li").length,
98        lastRightSpeed = 40, //控制拖动到最右边点是否对准时间刻度线上
99        processrowLength = $(".ewb-up").length,//
100        $agendacon = $(".ewb-agenda-yd"),//
101        $imgitem = $(".ewb-agenda-imgitem");//
102    //个数小于4个
103    if (processrowLength < 4) {
104       // $agendacon.addClass("none").draggable('destroy');
105       $agendacon.addClass("none");
106        clearTimeout(timer);
107        return;
108    } else {
109        $agendacon.removeClass("none")
110        if (totalCount % 2 == 1) {
111            //奇数个
112            $imgitem.css("width", (processrowLength * $(".ewb-up").width() + (processrowLength - 1) * 110 + 8) + "px");
113        } else {
114            //偶数个
115            $imgitem.css("width", (processrowLength * $(".ewb-up").width() + (processrowLength - 1) * 110 + 185 + 8) + "px");
116        }
117    }
118    function dragInfo(param) {
119        var leftPx = param * ($imgitem.width() - 1200) / 885;
120     //   var leftPx = param * ($imgitem.width() - 1200) / 957;
121        if (param == 15) {
122            leftPx = 0;
123        }
124        $imgitem.css("left", "-" + leftPx + "px");
125        $agendacon.css("left", (param + 15) + "px");
126    }
127    $agendacon.draggable({
128        cursor: "pointer",
129        axis: 'x',
130        containment: "parent",
131        grid: [1, 1],
132        distance: 20,
133        drag: function () {
134            var curPostion = $(this).position().left;
135            dragInfo(curPostion);
136            clearTimeout(timer);
137        }
138    });
139
140    
141
142
143    $('.ewb-video-items>li').on('click', function () {
144        $(this).find(".ewb-survey-show").fadeIn('fast');
145    });
146    $('.ewb-survey-back').on('click', function (e) {
147        e.stopPropagation();
148        $(this).parent(".ewb-survey-show").fadeOut('fast');
149    });
150
151    // tab切换
152    $(".tab-view").each(function (index, el) {
153        new TabView2({
154            dom: el,
155            activeCls: 'current',
156            triggerEvent: 'mouseover'
157        });
158    });
159
160    // vr
161    $('.ewb-loop').on('mousemove', function (e) {
162        //公式
163        var offsetX = e.clientX / window.innerWidth - 0.5,
164            offsetY = e.clientY / window.innerHeight - 0.5;
165        var _left = 140 * offsetX;
166        var _top = 140 * offsetY;
167        var _right = -140 * offsetX;
168        var _bot = -140 * offsetY;
169
170        //应用公式
171        $('.ewb-vr').css('left', _left * 0.3).css('top', _top * 0.3).css('right', _right * 0.3).css('bottom', _bot * 0.3);
172    });
173
174
175    // 全域旅游
176
177    $("#ewb-super").slide({
178        mainCell: ".ewb-tour-items",
179        autoPlay: true, //自动运行
180        autoPage: true, //自动分页
181        pnLoop: true, //前后按钮循环
182        delayTime: 500, //效果速度
183        effect: "leftLoop", //动画效果
184        trigger: "click"
185    });
186
187    //
188    Carousel.init($(".ewb-poster-main"));
189
190    // 视频
191    $(".ewb-watch-bg").slide({
192        mainCell: ".ewb-watch-item",
193        autoPage: true,
194        effect: "left",
195        autoPlay: false,
196        vis: 5
197    });
198
199}(this, 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.