added data-nobackbtn attr to override auto-add of back buttons at the header level. Fixes #131

This commit is contained in:
scottjehl 2010-10-10 15:15:45 -04:00
parent f78dccb1fb
commit 8cbb6186dc

View file

@ -42,7 +42,7 @@ $.widget( "mobile.page", $.mobile.widget, {
}
//auto-add back btn on pages beyond first view
if ( $.mobile.addBackBtn && role === "header" && $.mobile.urlStack.length > 1 && !leftbtn ) {
if ( $.mobile.addBackBtn && role === "header" && $.mobile.urlStack.length > 1 && !leftbtn && !$this.data( "noBackBtn" ) ) {
$( "<a href='#' class='ui-btn-left' data-icon='arrow-l'>Back</a>" )
.tap(function() {
history.back();