1.22 JQuery5:绑定自定义事件

JQuery 自定义事件 jQuery的事件自定义事件还是通过on绑定的,然后再通过trigger来触发这个事件 1. 绑定事件 //给element绑定hello事件 element.bind("hello",function(){ alert("hello world!"); }); 2. 执行事件 //触发hello事件 element.trigger("hello"); trig...