多个事件绑定
on("event1 event2",function(){ //callback }); on({ event1:function(){ //callback }, event2:function(){ //callback } });
滚动到顶部
$("#top").click(function(){
$("html,body").animate({scrollTop:0},800);
})
on("event1 event2",function(){ //callback }); on({ event1:function(){ //callback }, event2:function(){ //callback } });
$("#top").click(function(){
$("html,body").animate({scrollTop:0},800);
})