I have a Single Page Application running in PhoneGap, and driving through content with Sammy.js
Consider this:
The home page is domain.com/#/panel 
Then I click on Reglas(regulations) The location.hash updates to #/regulations

After this I can see the current regulations, when I click anyone of this, I update again the location.hash to #/regulation/1 (or whatever number the regulation is):

Here is the deal:
I have a back button inside my app in the navbar next to the screen title, and it have a click listener with this:
$('back').click(function(e) { e.preventDefault; // window.history.back(); history.back(); }); It works well when I'm at the 2nd screen (#/regulations), it brings me back to #/panel. But when I'm on a 3rd screen (#/regulation/1) it brings again to #/panel instead of the #/regulations section.
When I click browser's backbutton it works very good but somehow when I click MY back button it doesn't work properly.
I have read some topics about this, like Mozilla's one: 
Like Mozilla said, it should work exactly as if I clicked the browser's back button, but it doesn't.
I have tried with:
window.history.back(); window.history.go(-1); history.back(); history.go(-1); It seems not working with anything.
Can anyone help?