allow header, content, and footer to inherit theming from the page element, if unspecified on the elements themselves. Fixes #282

This commit is contained in:
scottjehl 2010-11-01 22:43:51 -04:00
parent 1c7396e65e
commit 9ff1a1be6d

View file

@ -25,7 +25,7 @@ jQuery.widget( "mobile.page", jQuery.mobile.widget, {
var $dataEls = $elem.find( "[data-role]" ).andSelf().each(function() {
var $this = jQuery( this ),
role = $this.data( "role" ),
theme = $this.data( "theme" );
theme = $this.data( "theme" ) || $this.parent('[data-role=page]').data( "theme" );
//apply theming and markup modifications to page,header,content,footer
if ( role === "header" || role === "footer" ) {