History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. Including continued support for data, titles, replaceState. Supports jQuery, MooTools and Prototype. For HTML5 browsers this means that you can modify the URL directly, without needing to use hashes anymore. For HTML4 browsers it will revert back to using the old onhashchange functionality.
The page loads fine for the first tab but when i click on the second or the third tab, the tab loads and then the whole page is reloded and now i have a whole page inside the tab i clicked.
I am using jquery mobile along with history.js for my SPA. I require history.js to change my url to remove some url params
Eg : a.com/?id=123&page=rep#rep_page
i use history.js to change this to a.com/#rep_page - works fine and the user is rep_page
This is my history.js redirect function
The issue occurs when i click on other page which has tabs.
Eg a.com/#tabs_page contains 3 tabs . I have the tab loading function inside
The page loads fine for the first tab but when i click on the second or the third tab, the tab loads and then the whole page is reloded and now i have a whole page inside the tab i clicked.
So my inital page structure is
The new page structure after clicking on the tabs is