Dogstudio / highway

Highway - A Modern Javascript Transitions Manager
https://highway.js.org/
MIT License
1.43k stars 92 forks source link

Change route programmatically #71

Closed grasmachien closed 4 years ago

grasmachien commented 4 years ago

Is there a way to change to another page with JS? document.location.href just reloads the page without using highway. I'm making something with three.js and want to go to another page when clicking an object. If there is no built in way to do this I guess I will have to fake a click on the menu items.

ThaoD5 commented 4 years ago

Hello @grasmachien,

There is a built-in function you can use to achieve that : have a look here https://highway.js.org/api.html#core

HIGHWAY.redirect(href, transition)