Access Multiple Elements of same ID in jQuery

前端 未结 4 696
离开以前
离开以前 2020-11-29 11:15

If i have elements such as this




         


        
4条回答
  •  执念已碎
    2020-11-29 11:49

    If multiple elements will share a certain property, you should assign class to them instead of id. So the resulting jquery code will look something like:

    $('.myEle').mouseup();
    

    ID is to be used to uniquely identify elements.

提交回复
热议问题