Jurudocs
Jurudocs

Reputation: 9165

Sliding pages with url change...how is that possible?

Today I was facinated from the following website http://soulwire.co.uk/ If clicked on the menu the site changes url and slides down. I've never seen such thing and I'm asking myself how that is working. JQuery can do such things but with setting anchors...

Somebody know how that works?

Upvotes: 1

Views: 1658

Answers (1)

Nick Zinger
Nick Zinger

Reputation: 1174

I took a peak into their .js code, and this is what they're using:

this.page.identifier=window.location.pathname;
this.page.url=window.location.href+"#!"+window.location.pathname;

So they actually stay on the same page, but they just change the url in the address bar.

Upvotes: 3

Related Questions