<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">$(function () {
    // è½®æ’­å›¾
    var carousel = function () {
        // èŽ·å–å›¾ç‰‡
        var carousel_left_img = $(".carousel_left_img")
        // ä¸‹ä¸€ä¸ªæŒ‰é’®
        var next = $(".carousel_left_next")
        // ä¸Šä¸€ä¸ªæŒ‰é’®
        var pre = $(".carousel_left_pre")
        // é”
        var key = true
        var li = $(".carousel_left_text ul li")
        // å½“å‰ä½ç½®çš„é»„è‰²çš„å°åœ†åœˆ
        var liIndex = 0
        // è¿”å›žå®šæ—¶å™¨çš„å‚æ•°
        var timeIn
        var i = 0;
        // æ’­æ”¾
        var nextPlay = function () {
            if (key) {
                key = false
                ++liIndex
                if (liIndex &gt; 2) {
                    liIndex = 0
                }
                if (parseInt(carousel_left_img.css("left")) &lt;= -1600) {
                    carousel_left_img.css("left", -400)
                }
                
                timeIn = setInterval(function () {
                    i++;
                    carousel_left_img.css("left", parseInt(carousel_left_img.css("left")) - 20)
                    if (i &gt;= 20) {
                        clearInterval(timeIn)
                        key = true
                        i = 0
                        liDot()
                    }
                }, 30)
            }
        }

        var prePlay = function () {
            if (key) {
                key = false
                --liIndex
                if (liIndex &lt; 0) {
                    liIndex = 2
                }

                if (parseInt(carousel_left_img.css("left")) &gt;= 0) {
                    carousel_left_img.css("left", -1200)
                }
                
                timeIn = setInterval(function () {
                    i++;
                    carousel_left_img.css("left", parseInt(carousel_left_img.css("left")) + 20)
                    if (i &gt;= 20) {
                        clearInterval(timeIn)
                        key = true
                        i = 0
                        liDot()
                    }
                }, 30)
            }
        }


        var liDot = function () {
            li.eq(liIndex).addClass('col').siblings().removeClass('col')
        }


        var timeOut;
        var autoPlay = function () {
            timeOut = setInterval(function () {
                nextPlay()
            }, 4000)
        }


        // å¼€å§‹æ’­æ”¾
        autoPlay()
        // é¼&nbsp;æ&nbsp;‡è¿›å…¥åœæ­¢æ’­æ”¾
        $('.carousel_left').on("mouseenter", function () {
            clearInterval(timeOut)
            
        })
        // é¼&nbsp;æ&nbsp;‡ç§»é™¤å¼€å§‹æ’­æ”¾
        $('.carousel_left').on("mouseleave", function () {
            autoPlay()
        })
        // ç‚¹å‡»ä¸‹ä¸€ä¸ª
        pre.on("click", function () {
            clearInterval(timeOut)
            prePlay()
        })
        // ç‚¹å‡»ä¸Šä¸€ä¸ª
        next.on("click", function () {
            clearInterval(timeOut)
            nextPlay()
        })
        // ç‚¹å‡»å°åœ†ç‚¹
        li.on('click',function () {  
            if(key){
                key = false
                var index = $(this).index()
                
                if(index&gt;liIndex){
                    timeIn = setInterval(function () {
                        console.log(index-liIndex)
                        i++;
                        carousel_left_img.css("left", parseInt(carousel_left_img.css("left")) - (index-liIndex)*20)
                        if (i &gt;= 20) {
                            clearInterval(timeIn)
                            key = true
                            i = 0
                            liIndex = index
                            liDot()
                        }
                    }, 30)
                }

                if(index&lt;liIndex){
                    timeIn = setInterval(function () {
                        i++;
                        carousel_left_img.css("left", parseInt(carousel_left_img.css("left")) + (liIndex-index)*20)
                        if (i &gt;= 20) {
                            clearInterval(timeIn)
                            key = true
                            i = 0
                            liIndex = index
                            liDot()
                        }
                    }, 30)
                }
              
               
            }
        })



        // å…‹éš†èŠ‚ç‚¹å¤šä½™1å’Œ3çš„è½®æ’­å›¾èŠ‚ç‚¹
        var carousel_left_img_first = $(".carousel_left_img li:first-child").clone()
        var carousel_left_img_last = $(".carousel_left_img li:last-child").clone()
        var carousel_left_img_ul = $(".carousel_left_img ul")

        carousel_left_img_last.prependTo(carousel_left_img_ul)
        carousel_left_img_first.appendTo(carousel_left_img_ul)

    }
    carousel()


    // æ–°é—»é€‰æ‹©
    var news = function () {
        var news_l = $('.news_l li')
        var news_c = $('.news_c ul')
        news_l.on('click', function (e) {
            $(this).addClass('theme').siblings().removeClass('theme')
            news_c.eq($(this).index()).siblings().css('display', 'none')
            news_c.eq($(this).index()).css('display', 'block')
        })
    }
    news()


    // è¿”å›žé¡¶éƒ¨å’Œæ–°é—»å›ºå®šå’Œçƒ­ç‚¹æ–°é—»
    var backTop = function () {
        var back_top = $('.back_top')
        var news_l = $('.news_l')
        var news_c = $('.news_c')
        var new_r = $('.news_r')
        $(window).scroll(function (e) {
            // æ–°é—»é€‰æ‹©   1028
            if ($(this).scrollTop() &gt;= 1030) {
                back_top.fadeIn()
                news_l.css('position', 'fixed')
                news_c.css('margin-left', '155px')
            } else {
                back_top.fadeOut()
                news_l.css('position', 'static')
                news_c.css('margin-left', '35px')
            }

            // çƒ­ç‚¹æŽ’è¡Œ
            // console.log($(this).scrollTop())   594
            if ($(this).scrollTop() &gt;= 600) {
                new_r.css({
                    'position': 'fixed',
                    'left': '50%',
                    'top': '30px',
                    'margin-left': '300px'
                })
            } else {
                new_r.css({
                    'position': 'static',
                    'margin-left': '0px'
                })
            }
        })
        // è¿”å›žé¡¶éƒ¨
        back_top.on('click', function () {
            $('html,body').animate({
                scrollTop: 0
            }, 500)
        })
    }
    backTop()


})</pre></body></html>