Permalink
Browse files

Page: Add set options method

  • Loading branch information...
arschmitz committed Jun 26, 2013
1 parent e34f138 commit 46eefb87056d5a6011284c026a9573afe67ab529
Showing with 12 additions and 0 deletions.
  1. +12 −0 js/widgets/page.js
View
@@ -54,6 +54,18 @@ $.widget( "mobile.page", $.mobile.widget, {
$.mobile._enhancer.enhance( this.element[ 0 ] );
},
_setOptions: function( o ) {
if( o.theme !== undefined ) {
this.element.removeClass( "ui-body-" + this.options.theme ).addClass( "ui-body-" + o.theme );
}
if( o.contentTheme !== undefined ) {
this.element.find( "[data-" + $.mobile.ns + "='content']" ).removeClass( "ui-body-" + this.options.contentTheme )
.addClass( "ui-body-" + o.contentTheme );
}
},
_handlePageBeforeShow: function(/* e */) {
this.setContainerBackground();
},

0 comments on commit 46eefb8

Please sign in to comment.