欧美操人网站,少妇导航av,二区v无码v亚洲v,成人无码网站在线观看,成人啪啪啪在线99久久er热在这里都是精品66_欧美成人精品三级网站在线观看_

jquery 根據(jù)下標(biāo)獲取classname,以及其子元素,修改classname的值

2023-4-20    前端達人

1. 根據(jù)下標(biāo)獲取對應(yīng)的classname,實現(xiàn)點擊按鈕觸發(fā)當(dāng)前塊的點擊事件

<div class="right" @click="meetingfileVisible(index)">
  <span class="foldIcon">
     <i class="el-icon-caret-bottom"></i>
  </span>
</div>
<div class="meeting-file">
  <span>與現(xiàn)實生活一致</span>
</div> 
            
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
.meeting-file{ display:none; } 
            
  • 1
  • 2
  • 3
meetingfileVisible(index) { $(".meeting-file").eq(index).slideToggle("slow"); var cal =$(".foldIcon").eq(index).children("i").attr("class"); cal = cal === 'el-icon-caret-bottom' ? 'el-icon-caret-top' : 'el-icon-caret-bottom'; $(".foldIcon").eq(index).children("i").attr("class", cal); }, 
            
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

日歷

鏈接

個人資料

藍(lán)藍(lán)設(shè)計的小編 http://www.monmeltingpot.net

存檔