jQuery plug in zepto. js simply implements tab switch

  • 2020-06-15 07:45:02
  • OfStack

As usual, post the code first


<script>
  $(function(){
    window.onload = function()
    {
      var $li = $('.taocan-title li');
      var $ul = $('.taocan-content .con110');
            
      $li.mouseover(function(){
        var $this = $(this);
        var $t = $this.index();
        $li.removeClass();
        $this.addClass('active');
        $ul.css('display','none');
        $ul.eq($t).css('display','block');
      })
    }
  });
</script>

This is the end of this article, I hope you enjoy it.


Related articles: