make sure the sticky footer matching is only true if data-ids are specified. This makes "tap" work again when toggling fixed headers and footers.

This commit is contained in:
scottjehl 2011-03-30 20:52:13 -04:00
parent 27b4cd29fc
commit e38a25de58

View file

@ -109,9 +109,9 @@ $.fixedToolbars = (function(){
prevFooter = prevPage && prevPage.find( ":jqmData(role='footer')" );
var prevFooterMatches = prevFooter.jqmData( "id" ) === id;
if( prevFooterMatches ){
if( id && prevFooterMatches ){
stickyFooter = footer;
setTop( stickyFooter.removeClass("fade").appendTo( $.mobile.pageContainer ) );
setTop( stickyFooter.removeClass( "fade in out" ).appendTo( $.mobile.pageContainer ) );
}
});
@ -122,9 +122,9 @@ $.fixedToolbars = (function(){
if( stickyFooter && stickyFooter.length ){
setTimeout(function(){
setTop( stickyFooter.appendTo( $this ) );
setTop( stickyFooter.appendTo( $this ).addClass("fade") );
stickyFooter = null;
},400);
}, 500);
}
$.fixedToolbars.show(true, this);