我想知道如何将多个处理程序函数绑定到元素上的同一事件,例如:
$("#this_element").on("click.action1", function(){
/* first thing to run when click this element */
}).on("click.action2", function(){
/* second thing to run when click this element */
}).on("click.action3", function(){
/* last thing to run when click this element */
})
将它们合并成一个函数:
$("#this_element").on("click", function() {
// first thing
// second thing
// third thing
});