<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">; (function () {
  var time = null;
  var Slider = function (options) {
    this.oSliderWrap = options.oSliderWrap;
    this.sliderItems = options.sliderItems;
    this.sliderLen = this.sliderItems.length;
    this.yuan = options.yuan;
    this.yuanItems = options.yuanItems;
    this.btnGroupLeft = options.btnGroupLeft;
    this.btnGroupRight = options.btnGroupRight;
    this.idx = 0;
    this.Isplay = options.autoPlay;
  }

  $.extend(Slider.prototype, {
    init: function () {
      this.bindEvent();
    //   console.log(this.Isplay)
      if (this.Isplay == true) {
        this.autoPlay();   
      }
    },
    bindEvent: function () {
      this.oSliderWrap.on('mouseenter', this.mouseIn);
      this.oSliderWrap.on('mouseleave', $.proxy(this.mouseOut, this));
      this.yuan.on('mouseenter', ".yuan-item", $.proxy(this.manSlider, this));
      if (this.btnGroupLeft != '') {
        this.btnGroupLeft.on('click', $.proxy(this.handlebtnLeft, this));  
      }
      if (this.btnGroupRight != '') {
        this.btnGroupRight.on('click', $.proxy(this.handlebtnRight, this))    
      }
    },

    //è‡ªåŠ¨è½®æ’­
    autoPlay: function () {
      time = setInterval(this.nextSlide.bind(this), 3000);
    },
    //é¼&nbsp;æ&nbsp;‡ç§»å…¥ï¼Œæ¸…é™¤å®šæ—¶å™¨
    mouseIn: function () {
      //clearInterval(time);
    },
    //é¼&nbsp;æ&nbsp;‡ç§»å…¥ï¼Œå¯åŠ¨å®šæ—¶å™¨
    mouseOut: function () {
      //this.autoPlay();
    },
    nextSlide: function () {
      if (this.idx &gt;= this.sliderLen - 1) {
        this.idx = 0;
      } else {
        this.idx++;
      }
      this._slideAction(this.idx);
    },

    prevSlide: function () {
      if (this.idx &lt;= 0) {
        this.idx = this.sliderLen - 1;
      } else {
        this.idx--;
      }
      this._slideAction(this.idx);
    },

    howSliderMove(things) {
      switch (things) {
        case 'left':
          this.prevSlide();
          break;
        case 'right':
          this.nextSlide();
          break;
      }
    },

    handlebtnLeft: function () {
      this.howSliderMove('left')
    },

    handlebtnRight: function () {
      this.howSliderMove('right')
    },

    //å°åœ†ç‚¹å¯¹åº”å›¾ç‰‡
    manSlider: function (e) {
      var e = e || window.event;
      var tar = e.target || e.srcElement;
      var tagName = tar.tagName.toLowerCase();
      if (tagName === "i") {
        this.idx = Array.prototype.indexOf.call(this.yuanItems, tar);  //indexçš„ä½ç½®
        this._slideAction(this.idx);
      }
    },

    //å›¾ç‰‡åˆ‡æ¢
    _slideAction: function (idx) {
      this.sliderItems.eq(idx).stop(true, true).fadeIn(1000)
        .siblings().stop().fadeOut(1000);
      this.yuanItems.eq(idx).addClass('cur')
        .siblings().removeClass('cur');
    },
  });

  window.Slider = Slider;

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