由父类index 找子类index

var minIndex = index;
      var maxIndex = $(event.target).parents(".bigItem").index();


      console.log("大的:" + maxIndex);
      console.log("晓得:" + minIndex);

 <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
posted @ 2022-06-23 18:11  ·一库  阅读(19)  评论(0)    收藏  举报