pageinit event

pageinit

pageinit eventversion added: 1.0, deprecated: 1.4

Description: Triggered on the page being initialized, after initialization occurs.

  • jQuery( ".selector" ).on( "pageinit", function( event ) { ... } )

We recommend binding to this event instead of DOM ready() because this will work regardless of whether the page is loaded directly or if the content is pulled into another page as part of the Ajax navigation system.

$( document ).on( "pageinit", "#aboutPage", function( event ) {
  alert( "This page was just enhanced by jQuery Mobile!" );
});
Note: This event has been deprecated in 1.4.0 in favor of pagecreate. Simply replace pageinit in the above example.

© The jQuery Foundation and other contributors
Licensed under the MIT License.
https://api.jquerymobile.com/pageinit

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部