how to change URL dynamically in HTML5 -
i'm creating single html5 page using bootstrap. have menu items services, portfolio etc. when click on 1 of these menu items, scrolls down , display particular section not change url.
for example: suppose if opens website, index.html open. if click on "portfolio" link, scrolls down , display section "portfolio" not change url index.html#portfolio. remains index.html
refer: www.nuabikes.com/#/home when open site, click on 1 of menu item , check url, changes automatically. , when page scrolled down url changes automatically.
i want add feature in page.
when change content javascript , want change reflect in address. called routing, check up.
basically have 3 options:
- use framework such angularjs or ember routing more or less
- us jquery plugin this. such http://www.asual.com/jquery/address/
- handle change yourself. see reference: updating address bar new url without hash or reloading page
Comments
Post a Comment