为多个元素绑定同一个事件:

        $(document).on('click', '#header .fixed-feedback-bn, #sb-sec .feedback-bn', function () { 
            // code... 
        });

为同一个元素绑定多个事件:

$("table.planning_grid").on({ 
    mouseenter: function() { 
        // Handle mouseenter... 
    }, 
    mouseleave: function() { 
        // Handle mouseleave... 
    }, 
    click: function() { 
        // Handle click... 
    } 
}, "td");

 

相关文章:

  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-06
  • 2021-11-07
  • 2022-12-23
  • 2022-01-17
  • 2021-07-01
  • 2021-10-09
相关资源
相似解决方案