Removing Back Button on jQuery Mobile

January 28, 2011
web

When building native apps with jQuery Mobile I often find that the back button is not needed in the header toolbar. There is a quick and easy way to disable it by adding data-backbtn="false" to your header:

<div data-role="header" data-backbtn="false">
  <h1>Mileage Pad</h1>
</div>


2 people found this page useful, what do you think?

Comments

Ahh! Thank you! I was kicking around this issue just yesterday. I thought there must be an easy way to do it. You have saved me some painful searching and a lot of trial and error!

Many thanks!
Odd... its not working for me. But I change the attribute to this and it did work:
data-nobackbtn="true"
Steve what version of jQuery Mobile are you using Alpha 2 or Alpha3 (from git repo)
Alpha 2... that was the latest I saw online earlier this week. I'll take another look... maybe I missed a newer version.
I only see a2, even on Github.
Alpha 3 has not been released yet but you can download it from their git repository.
Right I probably shouldn't call it alpha 3 since it has not been released yet, but if you download the latest source from git that's what I'm talking about.
I only see a2, even on Github.
I am sure everyone has seen this but:
http://jquerymobile.com/2011/02/jquery-mobile-alpha-3-released/
I'm working my way through the docs in preparation for my SOTR preso. One thing I wish they would do is create a list of _all_ the data attributes along with where they can be used and what they do. I may end up doing that myself.
Yeah I agree, I always prefer a straight up reference over docs embedded in prose.
thanks, had to fumble around with this for too long
yeiiiiiii!! thank u dude
data-nobackbtn="true" attribute works for me with latest JQuery mobile 1.0a4.1
That's a sensible answer to a chgnielalng question

Post a Comment




  



Spell Checker by Foundeo

Recent Entries



foundeo


did you hack my cf?