Answer the question
In order to leave comments, you need to log in
With what help to implement routing (taking into account the history of the browser) on jQuery?
Good afternoon. There is a task to make a competent route on the page (with loading of ajax-content in the leaving panels). It must also be taken into account that there should be a fallback for ie8-9.
Rummaged through a bunch of plugins on this subject, but could not achieve what is required.
I make panels using https://panels.scotch.io/ . When clicking on the menu on the page, the panel leaves (content is loaded into it by Ajax), I was able to change the hash when opening, when I return to the main one, I close the panel, reset the hash. But how to do it not by clicks, but taking into account the history of the browser?! (forward, backward, and so on for each panel)
+ in sections (content loaded in them) there will be subsections, to which there should also be a scroll and a hash change, respectively. History should also work.
Triedhttps://github.com/devote/HTML5-History-API - you need to write a bunch of conditions for each url to open/
close panels browser history
Please tell me how it is better to implement and what to use? I'm confused)
Answer the question
In order to leave comments, you need to log in
It was decided to use Angular.js with its routing and ngAnimate module. Routing will work on IE 9+, page transition animations on IE 10+
For 8, of course, you will have to make a version, ala canvas with smooth scrolling.
This is the way out
History.pushState
History.replaceState
History.state
Well, events, etc... It works on a principle similar to cookies, but in JS.
And yes, Donkey 10+
And what do you want, use newfangled technologies and want to support junk.
In theory, you can again crutch sessions on the backend and, depending on them, change the JS code. But it's easier and MORE CORRECT (IMHO) to score on the offspring of Win XP (in Vista, it's already 10-like). And who uses them - even if there is an ancient donkey, 99% of the people put chrome or opera. 1% can be hinted to do so.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question