jquery/jquery-mobile — pull request #4902 by mariozaizar (2012-08-28 05:19:21+00:00)
Title: Be able to use 'reverse' direction, even if you disable jQuery Mobile binding to use backbone.js

## Context:
- jQuery Mobile + backbone.js App.
- jQuery Mobile bindings/history/routing were disabled to use Backbone's.
- Back buttons are being used manually (so window.history.back();)

## Problem:
- 1.1.1 won't apply the reverse direction even if you set the link with data-direction="reverse" to the links.

## Example:
For example having:

```
# Disable jQuery Mobile routing and history to use Backbone.
$.mobile.ajaxEnabled = false
$.mobile.linkBindingEnabled = false
$.mobile.hashListeningEnabled = false
$.mobile.pushStateEnabled = false

# Enable backbutton by default
$.mobile.page.prototype.options.addBackBtn = true
```

This includes all the backbuttons, but since all the back buttons handlers are disabled, you need to redirect to back manually:

```
($('a[data-rel="back"]')).live('click', function() {
window.history.back();
});
```

That will work. But sadly you won't see the default reverse direction for any back button. But it will be fixed by setting the ` $.mobile.forceReverse = true`. So letting the application to use forward direction by default, and reverse for all the back buttons.

```
($('a[data-rel="back"]')).live('click', function() {
$.mobile.forceReverse = true;
});
```