-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture any URL change #77
Comments
Did you find solution for this? |
No, I moved to another library. |
Which library? |
Sorry I don't remember, it's more than one year ago. |
Ok. Path.rescue did the work for me. Thanks anyways. |
@amatiasq The way I do it in pure JS is: var routeFunc = function() {
var page = document.location.hash.split('=');
switch (page[0]) {
case '#!archive':
// some code
break;
case '#!home':
// some code
break;
default:
// some code
}
};
var initFunc = function() {
routeFunc();
window.addEventListener('hashchange', routeFunc, false);
};
window.addEventListener('load', initFunc, false); You'll have to prefix all urls with I'm using the same code in my blog - https://github.com/wifiextender/wifiextender.github.io/blob/master/dev/src/main.js#L105 |
Hey there, I need some way to capture any type of URL change, is there a way to do this? Something like
The text was updated successfully, but these errors were encountered: