Allow preventing the default initialization for pages by canceling the pagebeforecreate event. Fixes #105.

This commit is contained in:
Scott González 2010-10-09 14:45:16 -04:00
parent 74a66af37b
commit 5b2bbd7b9f

View file

@ -4,7 +4,9 @@ $.widget( "mobile.page", $.mobile.widget, {
options: {},
_create: function() {
this._trigger( "beforeCreate" );
if ( this._trigger( "beforeCreate" ) === false ) {
return;
}
//some of the form elements currently rely on the presence of ui-page and ui-content
// classes so we'll handle page and content roles outside of the main role processing