This problem seems to be unique to Android 2.x. Your code works fine on Android 4.x. For some reason, windows.back()/windows.forward() has no effect when called directly out of the tab bar click handler on Android 2.x. You can work around this by using a short timeout:
function back() {
setTimeout(function() {
window.history.back();
}, 100);
return false;
}
function forward() {
setTimeout(function() {
window.history.forward();
}, 100);
return false;
}