PageSourceSearch

http://www.lianzhou.gov.cn/global/index.js

js lianzhou.gov.cn collected 2026-10-02 12:54:52 UTC 8,975 bytes, 382 lines download raw bytes

1$(function () {
2    initBackground();
3
4    initSloganLeft();
5    initSloganRight();
6
7    /*首页*/
8    var pageIndex_index = $("#myFocus1 .indexList");
9    var ImgList_index = $("#myFocus1 .imgList");
10    slideBanner(pageIndex_index, ImgList_index, 570)
11
12    /*资讯中心*/
13    var pageIndex_zxzx = $("#zxzxIndexList");
14    var ImgList_izxzx = $("#zxzxImgList");
15    slideBanner(pageIndex_zxzx, ImgList_izxzx, 1160);
16
17    /*右侧二维码关闭*/
18    $("#closeQRCode").click(function () {
19        $("div#QRCode").slideToggle();
20    })
21
22    scrollTop();
23
24    //走进连州无限滚动
25    initMarquee("outerDiv", "floatImgFirst", "floatImgSecond");
26
27    initQRCodeImgSwitch();
28
29    slideLink($("#linkButton"), $("#mbcs_inner_div"), 370);
30
31
32    listenScroll();
33})
34
35/*监听滚动*/
36function listenScroll()
37{
38    $(window).scroll(function (event) {
39        var topScroll = window.scrollY;
40        var QRCode = $("#QRCode");
41        if (topScroll < 400)
42        {
43            QRCode.css({top: '400px'});
44        }
45
46        if (topScroll >= 400)
47        {
48            QRCode.css({top: '100px'});
49        }
50    })
51}
52
53
54/*右边边标语切换 5-8*/
55function initSloganRight()
56{
57    var byRight = $("#byRight");
58    var index = 5;
59    var timer = setInterval(function () {
60        if (index < 8)
61        {
62            index++;
63        }
64        else
65        {
66            index = 5;
67        }
68
69        byRight.animate({opacity: 0.7}, 750).fadeIn(1000, function () {
70            $(this).attr("src", "/global/ico_by" + index + ".png").animate({opacity: 1}, 500);
71        });
72    }, 3000);
73}
74
75/*左边标语切换 1-4*/
76function initSloganLeft()
77{
78    var byLeft = $("#byLeft");
79    var index = 1;
80    var timer = setInterval(function () {
81        if (index < 4)
82        {
83            index++;
84        }
85        else
86        {
87            index = 1;
88        }
89
90        byLeft.animate({opacity: 0.7}, 750).fadeIn(1000, function () {
91            $(this).attr("src", "/global/ico_by" + index + ".png").animate({opacity: 1}, 500);
92        });
93    }, 3000);
94}
95
96
97/*tab切换效果:首页*/
98function switchTab_index(event, className)
99{
100    if (className)
101    {
102        $(event).parent().find("a").removeClass(className);
103        $(event).addClass(className);
104    }
105    else
106    {
107        $(event).parent().find("a").removeClass("active");
108        $(event).addClass("active");
109    }
110
111
112    var index = $(event).index();
113    $(event).parent().next().children("ul").eq(index).show().siblings("ul").hide();
114}
115
116function switchTab_zxfw(event)
117{
118    $(event).parent().find("a").removeClass("active");
119    $(event).addClass("active");
120
121    var index = $(event).index();
122    $(event).parent().parent().next().children("div").eq(index).show().siblings("div").hide();
123}
124
125function switchTab_zxzx(event)
126{
127    $(event).parent().find("a").removeClass("zwyw");
128    $(event).addClass("zwyw");
129
130    var index = $(event).index();
131    $(event).parent().next().children("div").eq(index).show().siblings("div").hide();
132}
133
134
135/*二维码图片切换*/
136function initQRCodeImgSwitch()
137{
138    var qrCodeButton = $("#qrCodeButton").find("div");
139    var qrCodeImgList = $("#qrCodeImgList");
140    qrCodeButton.each(function () {
141        $(this).hover(function () {
142            var index = $(this).index();
143            qrCodeImgList.find("div").hide();
144            qrCodeImgList.find("div").eq(index).show();
145        })
146    })
147}
148
149
150/*回顶部函数*/
151function scrollTop()
152{
153    $("#topImg").click(function () {
154        $("html,body").animate({scrollTop: 0}, 1000);
155    });
156}
157
158/*背景图切换*/
159function initBackground()
160{
161    var background = $("#background");
162    var index = 1;
163    var timer = setInterval(function () {
164        if (index < 2)
165        {
166            index++;
167        }
168        else
169        {
170            index = 1;
171        }
172
173        background.animate({opacity: 0.7}, 750).fadeIn(1000, function () {
174            $(this).attr("class", "banner" + index).animate({opacity: 1}, 1000);
175        });
176    }, 5000);
177}
178
179function initMarquee(contentId, firstInfoId, secondInfoId)
180{
181    var speed = 30;
182    var infoContent = $("#" + contentId);
183    var info1 = $("#" + firstInfoId);
184    var info2 = $("#" + secondInfoId);
185    info2.html(info1.html());
186
187    function scoll()
188    {
189        if (infoContent.scrollLeft() >= info1.width())
190        {
191            infoContent.scrollLeft(0);
192        }
193        else
194        {
195            infoContent.scrollLeft(infoContent.scrollLeft() + 1);
196        }
197    };
198
199    var timer = setInterval(scoll, speed);
200
201    infoContent.mouseover(function () {
202        clearInterval(timer);
203    });
204
205    infoContent.mouseout(function () {
206        timer = setInterval(scoll, speed);
207    });
208}
209
210/**
211 * 图片左右切换
212 * @param obj  摆放序号的元素
213 * @param objImg  图片列表元素
214 * @param width  图片宽度
215 */
216function slideBanner(obj, objImg, width)
217{
218    var curIndex = 0; //当前indexf
219    var imgLen = objImg.find("li").length == 0 ? 4 : objImg.find("li").length; //图片总数
220    //定时器自动变换5秒每次
221    var autoChange = setInterval(function () {
222        if (curIndex < imgLen - 1)
223        {
224            curIndex++;
225        }
226        else
227        {
228            curIndex = 0;
229        }
230        //调用变换处理函数
231        changeTo(curIndex);
232    }, 5000);
233
234    var html = "";
235    for (var i = 1; i <= imgLen; i++)
236    {
237        html += "<li>" + i + "</li>";
238    }
239    obj.append(html);
240    obj.find("li:first").addClass("current")
241    //对右下角按钮index进行事件绑定处理等
242    obj.find("li").each(function (item) {
243        $(this).hover(function () {
244            clearInterval(autoChange);
245            changeTo(item);
246            curIndex = item;
247        }, function () {
248            autoChangeAgain();
249        });
250    });
251
252    //清除定时器时候的重置定时器--封装
253    function autoChangeAgain()
254    {
255        autoChange = setInterval(function () {
256            if (curIndex < imgLen - 1)
257            {
258                curIndex++;
259            }
260            else
261            {
262                curIndex = 0;
263            }
264            //调用变换处理函数
265            changeTo(curIndex);
266        }, 5000);
267    }
268
269    //切换
270    function changeTo(num)
271    {
272        var goLeft = num * width;
273        objImg.animate({
274            marginLeft: "-" + goLeft + "px"
275        }, width);
276        obj.find("li").removeClass("current").eq(num).addClass("current");
277    }
278}
279
280/**
281 * 在线服务"左右切换效果
282 * @param obj 序号div
283 * @param objImg  当前内容的div
284 * @param width  图片宽度
285 */
286function slideLink(obj, objImg, width)
287{
288    var curIndex = 0; //当前index
289    var imgLen = objImg.find("div.bmcs").length; //图片总数
290
291    var html = "";
292    for (var i = 1; i <= imgLen; i++)
293    {
294        html += '<a href="javascript:void(0);">' + i + '</a>';
295    }
296    obj.append(html);
297    obj.find("a:first").addClass("dq")
298    //对右下角按钮index进行事件绑定处理等
299    obj.find("a").each(function (item) {
300        $(this).hover(function () {
301            changeTo(item);
302            curIndex = item;
303        });
304    });
305
306    //切换
307    function changeTo(num)
308    {
309        var goLeft = num * width;
310        objImg.animate({
311            marginLeft: "-" + goLeft + "px"
312        }, width);
313        obj.find("a").removeClass("dq").eq(num).addClass("dq");
314    }
315}
316
317/*根据编号和密码查看信件*/
318function usePwdAndCode()
319{
320    var url = "/web/inquiry/PublicityCheckPage_M/toDetailPageByCode";
321    var code = $("#inquiryCode").val().trim();
322    if (code)
323    {
324        url += "?code=" + code;
325    }
326    else
327    {
328        alert("编号不能为空");
329        $("#inquiryCode").focus();
330        return;
331    }
332    var password = $("#inquiryPassword").val().trim();
333    if (password)
334    {
335        url += "&password=" + password;
336    }
337    else
338    {
339        alert("密码不能为空");
340        $("#inquiryPassword").focus();
341        return;
342    }
343
344    var ajax = new Cyan.Ajax();
345    ajax.method = "GET";
346    ajax.setRequestHeader("Accept", "text/json");
347    ajax.handleObject = function (result) {
348        if (result == "ok")
349        {
350            window.open("/web/lzxmh/inquiry/inquiry_pwd_detail.ptl?code="+ code+"&pwd=" + password, "_blank")
351        }
352        else if (result == "noInquiryFound")
353        {
354            alert("编号或者密码填写错误");
355        }
356        else if (result == "processing")
357        {
358            alert("来信正在处理中,请耐心等候");
359        }
360        else
361            alert(result);
362    }
363    ajax.call(url);
364}
365
366
367/*进入外链提示页面,需使用click方式 兼容ie*/
368function gotoUrl(url)
369{
370    if (window.VBArray)
371    {
372        var gotoLink = document.createElement('a');
373        gotoLink.setAttribute("target", "_blank");
374        gotoLink.href = "/web/external.jsp?url=" + encodeURIComponent(url);
375        document.body.appendChild(gotoLink);
376        gotoLink.click();
377    }
378    else
379    {
380        window.open(url);
381    }
382}

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.