Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Expose public enhance method on mobile.page (solves issue 1561) #1732

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions js/jquery.mobile.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,19 @@ $.widget( "mobile.page", $.mobile.widget, {
},

_create: function() {
var $elem = this.element,
o = this.options;

this.keepNative = ":jqmData(role='none'), :jqmData(role='nojs')" + (o.keepNative ? ", " + o.keepNative : "");

if ( this._trigger( "beforeCreate" ) === false ) {
return;
}

this.enhance();
},

enhance: function() {
var $elem = this.element,
o = this.options;

this.keepNative = ":jqmData(role='none'), :jqmData(role='nojs')" + (o.keepNative ? ", " + o.keepNative : "");

//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
// loop below.
Expand Down