Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Toolbar: Corrections in back button info on demo page
Browse files Browse the repository at this point in the history
Fixes gh-6835
Closes gh-7075
  • Loading branch information
jaspermdegroot committed Feb 6, 2014
1 parent 4b66652 commit 0121fd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demos/toolbar/index.php
Expand Up @@ -120,19 +120,19 @@

<h2>Adding back button to header</h2>

<p>jQuery Mobile has a feature to automatically create and append "back" buttons to any header, though it is disabled by default. This is primarily useful in chromeless installed applications, such as those running in a native app webview. The framework automatically generates a "back" button on a header when the page plugin's <code>addBackBtn</code> option is true. This can also be set via markup if the page div has a <code>data-add-back-btn="true"</code> attribute.</p>
<p>jQuery Mobile has a feature to automatically create and append "back" buttons to any header, though it is disabled by default. This is primarily useful in chromeless installed applications, such as those running in a native app webview. The framework automatically generates a "back" button on a header when the page plugin's <code>addBackBtn</code> option is true. This can also be set via markup if the header has a <code>data-add-back-btn="true"</code> attribute.</p>

<p>If you use the attribute <code>data-rel="back"</code> on an anchor, any clicks on that anchor will mimic the back button, going back one history entry and ignoring the anchor's default href. This is particularly useful when linking back to a named page, such as a link that says "home", or when generating "back" buttons with JavaScript, such as a button to close a dialog. When using this feature in your source markup, <strong>be sure to provide a meaningful href that actually points to the URL of the referring page. This will allow the feature to work for users in C-Grade browsers.</strong></p>

<p>If you just want a reverse transition without actually going back in history, you should use the <code>data-direction="reverse"</code> attribute.</p>

<h3>Customizing the back button text</h3>

<p>If you'd like to configure the back button text, you can either use the <code>data-back-btn-text="previous"</code> attribute on your header element, or set it programmatically via the page plugin's options:<br><code>$.mobile.toolbar.prototype.options.backBtnText = "previous";</code></p>
<p>If you'd like to configure the back button text, you can either use the <code>data-back-btn-text="previous"</code> attribute on your header element, or set it programmatically via the toolbar plugin's options:<br><code>$.mobile.toolbar.prototype.options.backBtnText = "previous";</code></p>

<h3>Default back button style</h3>

<p>If you'd like to configure the back button role-theme, you can use:<br>
<p>If you'd like to configure the back button theme, you can use:<br>
<code>$.mobile.toolbar.prototype.options.backBtnTheme = "a";</code><br>
If you're doing this programmatically, set this option inside the <code>mobileinit</code> event handler.</p>

Expand Down

0 comments on commit 0121fd0

Please sign in to comment.