📜  jquery on change on multiple elements - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:19.559000             🧑  作者: Mango

代码示例1
$('.class1, .class2').on('click', function () {console.log('TODO...')});

//OR....

var elem1 = $('.class1');
var elem2 = $('.class2');
elem1.add(elem2).on'click', function () {console.log('TODO...')});