Permalink
Browse files

Pagecontainer: Implement classes option

  • Loading branch information...
arschmitz committed Aug 7, 2015
1 parent 0d75223 commit 8fbf36a710ebb9ba119fd7ad0fb45dad8b794379
Showing with 5 additions and 3 deletions.
  1. +5 −3 js/widgets/pagecontainer.js
@@ -90,6 +90,8 @@ $.widget( "mobile.pagecontainer", {
// TODO move from page* events to content* events
this._on( { pagechange: "_afterContentChange" } );
this._addClass( "ui-pagecontainer" );
// Handle initial hashchange from chrome :(
this.window.one( "navigate", $.proxy( function() {
this.setLastScrollEnabled = true;
@@ -98,10 +100,10 @@ $.widget( "mobile.pagecontainer", {
_setOptions: function( options ) {
if ( options.theme !== undefined && options.theme !== "none" ) {
this.element.removeClass( "ui-overlay-" + this.options.theme )
.addClass( "ui-overlay-" + options.theme );
this._removeClass( null, "ui-overlay-" + this.options.theme )
._addClass( null, "ui-overlay-" + options.theme );
} else if ( options.theme !== undefined ) {
this.element.removeClass( "ui-overlay-" + this.options.theme );
this._removeClass( null, "ui-overlay-" + this.options.theme );
}
this._super( options );

0 comments on commit 8fbf36a

Please sign in to comment.