mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +00:00
34 lines
728 B
JavaScript
34 lines
728 B
JavaScript
/*
|
|
* "page" plugin
|
|
*/
|
|
|
|
(function( $, undefined ) {
|
|
|
|
$.widget( "mobile.page", $.mobile.widget, {
|
|
options: {
|
|
theme: "c",
|
|
domCache: false,
|
|
keepNativeDefault: ":jqmData(role='none'), :jqmData(role='nojs')"
|
|
},
|
|
|
|
_create: function() {
|
|
|
|
this._trigger( "beforecreate" );
|
|
|
|
this.element
|
|
.attr( "tabindex", "0" )
|
|
.addClass( "ui-page ui-body-" + this.options.theme );
|
|
},
|
|
|
|
keepNativeSelector: function() {
|
|
var options = this.options,
|
|
keepNativeDefined = options.keepNative && $.trim(options.keepNative);
|
|
|
|
if( keepNativeDefined && options.keepNative !== options.keepNativeDefault ){
|
|
return [options.keepNative, options.keepNativeDefault].join(", ");
|
|
}
|
|
|
|
return options.keepNativeDefault;
|
|
}
|
|
});
|
|
})( jQuery );
|