Answers for "jquery on change on multiple elements"

1

jquery on change on multiple elements

$('.class1, .class2').on('click', function () {console.log('TODO...')});

//OR....

var elem1 = $('.class1');
var elem2 = $('.class2');
elem1.add(elem2).on'click', function () {console.log('TODO...')});
Posted by: Guest on March-25-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language