Attaching an event to multiple elements at one go

后端 未结 0 891
时光取名叫无心
时光取名叫无心 2020-12-23 04:36

Say I have the following :

var a = $(\"#a\");
var b = $(\"#b\");

//I want to do something as such as the following : 

$(a,b).click(function () {/* */}); //         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题