jQuery toggle class on child element

后端 未结 4 1219
太阳男子
太阳男子 2020-12-22 00:34

I have list of links, and if you click on any of them, it will toggle show/hide text below it in separate div. Also it hides all other divs if one of them is shown This code

4条回答
  •  一生所求
    2020-12-22 01:26

    Find the and call toggleClass

    $(this).find("i").toggleClass("fa-plus-square fa-minus-square")
    

提交回复
热议问题