$('.class1, .class2').on('click', some_function);
Or:
$('.class1').add('.class2').on('click', some_function);
This also works with existing objects:
const $class1 = $('.class1');
const $class2 = $('.class2');
$class1.add($class2).on('click', some_function);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…