jQuery mobile-一个或多个页面事件?

jQuery mobile-一个或多个页面事件?,jquery,jquery-mobile,jquery-mobile-pageshow,Jquery,Jquery Mobile,Jquery Mobile Pageshow,我的应用程序中几乎每个页面都有自己的pageinit和pageshow函数来加载内容和注册事件侦听器。因此,由于最后我有大约20个监听器,我在问自己,如果将它们放在一起,是否对jqms性能更好,所以使用 $(document).on( "pageshow", function( event, ui ) { //... choose action based on ui.nextPage }); 而不是 $(document).on('pagebshow', '#home', functio

我的应用程序中几乎每个页面都有自己的pageinit和pageshow函数来加载内容和注册事件侦听器。因此,由于最后我有大约20个监听器,我在问自己,如果将它们放在一起,是否对jqms性能更好,所以使用

$(document).on( "pageshow", function( event, ui ) {
  //... choose action based on ui.nextPage
});
而不是

$(document).on('pagebshow', '#home', function(){
 //... doing stuff for this site
}
每一页