0

I'm working on a One-page website with 3 main pages: as so :

<ol class="bar-links">
    <li><a href="#" class="links hvr-grow" data-use="catalogue">catalogue</a>   
    <a href="#" class="links hvr-grow" id="sup1" data-use="news">news</a>
    <a href="#" class="links hvr-grow" id="sup1" data-use="sell">sell</a>
   </li>
</ol> 

I used history.pushState() to change url when someone click on the links, but how can i make the page load when someone enter mywebsite.com/catalogue (or one of the others) because now it says page don't exist (I suppose i need to formulate some kind of GET request ?).

Nathan Schwarz
  • 631
  • 5
  • 19

1 Answers1

1

It appears you can use history.pushState if your browser supports it.

Refer to How to change URL in browser without navigating away from page?

Community
  • 1
  • 1
DGS
  • 6,015
  • 1
  • 21
  • 37