Permalink
Browse files

When using historyjs use getBaseUrl() instead of getRootUrl() to hand…

…le other context paths other than root. Fixes #109
  • Loading branch information...
1 parent a32703b commit 24239b374d92aa111579eba4998e812f6ee77a01 @tedsteen tedsteen committed Mar 12, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 pager.js
View
@@ -1454,15 +1454,14 @@
// Bind to StateChange Event
History.Adapter.bind(window, 'statechange', function () {
- var baseUrl = $('base').attr('href');
- var relativeUrl = History.getState().url.replace(baseUrl, '');
+ var relativeUrl = History.getState().url.replace(History.getBaseUrl(), '');
goTo(relativeUrl);
});
History.Adapter.bind(window, 'anchorchange', function () {
goTo(location.hash);
});
- goTo(History.getState().url.replace(History.getRootUrl(), ''));
+ goTo(History.getState().url.replace(History.getBaseUrl(), ''));
};
pager.startHashChange = function (id) {

0 comments on commit 24239b3

Please sign in to comment.