jQuery.mobilize is now jQuery.fn.page
I just converted jQuery.mobilize to a widget which is exposed as jQuery.fn.page (and jQuery.mobile.page for the actual constructor).
Now instead of
- jQuery.mobilize( jQuery( ".ui-page" ) );
You'll use the more common form:
- jQuery( ".ui-page" ).page();
Along with this change, the beforeload and load events have been renamed to pagebeforecreate and pagecreate. If you call event.preventDefault() on the pagebeforecreate event, the page initialization will not run.
There is also no longer a data-mobilized attribute on pages. If you want to know whether a page has been initialized, you can use:
- jQuery( "#my-page" ).is( ":data(page)" )
- // or
- jQuery( "#my-page" ).is( ":mobile-page" )
Finally, if you want to be able to re-run the initialization, you must destroy the page first:
- jQuery( "#my-page" ).page( "destroy" );