jquery-mobile/js/jquery.mobile.page.js

43 lines
1.1 KiB
JavaScript
Raw Normal View History

//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
2012-01-07 00:28:54 +00:00
//>>description: Basic page formatting.
//>>label: Pages
2012-01-13 05:22:00 +00:00
define( [ "jquery", "jquery.mobile.widget" ], function( $ ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {
$.widget( "mobile.page", $.mobile.widget, {
options: {
theme: "c",
domCache: false,
keepNativeDefault: ":jqmData(role='none'), :jqmData(role='nojs')"
},
_create: function() {
// if false is returned by the callbacks do not create the page
if( this._trigger( "beforecreate" ) === false ){
return false;
}
2011-09-06 15:31:18 +00:00
this.element
.attr( "tabindex", "0" )
.addClass( "ui-page ui-body-" + this.options.theme );
},
keepNativeSelector: function() {
var options = this.options,
2011-10-11 15:31:10 +00:00
keepNativeDefined = options.keepNative && $.trim(options.keepNative);
if( keepNativeDefined && options.keepNative !== options.keepNativeDefault ){
return [options.keepNative, options.keepNativeDefault].join(", ");
}
return options.keepNativeDefault;
}
});
})( jQuery );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
2011-10-31 05:03:56 +00:00
});
//>>excludeEnd("jqmBuildExclude");