About the history of jquery
jquery History Plugin helps you-support back/forward buttons and bookmarks in your JavaScript applications. Historical jquery Plug-ins can be To help you get back to your JavaScript support applications/forward buttons and bookmarks. You can store the "application state" into the URL hash and restore the states from it. It is possible to save the URL hash of the application state and restore its status.
Download Jquery.history.js
Download Jquery.history.js
JQuery History plugin is hosted on Github.
The historical jquery plugin is hosted on the GitHub.
Please visit the project page for development.
Please visit the project page for development.
Browsers supported by supported browsers
Internet Explorer 6, 7, and 8+ Internet Explorer 6,7 and 8 +
Safari 4 and 5+
Safari 4 and 5 +
Google Chrome 4+
Google Browser 4 +
This plugin was built on Hashchange event, which is defined in HTML5 and supported in most modern. Unless it is supported the plugin works on some fallback mechanisms: This plugin is a Hashchange event under construction, which is defined in browsers to support HTML5 and the most modern mechanism. Unless it is supported by some back-up plug-in works:
Monitoring Location.hash by SetInterval (Safari 4)
Monitored by setinterval location.hash (Safari 4)
IFrame and SetInterval (IE 6, 7, and compatibility mode on IE8)
IFrame and SetInterval (that is, the 7th and compatible mode of 6,IE8)
Known Issues
Known Issues
IE6, 7, and IE8 compatibility mode
Compatibility mode in ie6,7 and IE8
Back/forward button won't work if you refresh the page and the document is reloaded.
The Back/forward button will not work if you refresh the page and the file reloads.
IE8 Standards Mode
Standard mode of IE8
The current hash is recorded in the history if you update the URL of the hash by hand or loading bookmarks.
The current hash will not be recorded in the history if you use the hand or load to update the bookmark URL hash.
Demos
Some demos are available and included in the repository.
And this site itself are built on the plugin:
Copy Code code as follows:
(function ($) {
var origcontent = "";
function Loadcontent (hash) {
if (hash!= "") {
if (origcontent = = "") {
Origcontent = $ (' #content '). html ();
}
$ (' #content '). Load (hash + ". html"),
function () {prettyprint ();});
else if (origcontent!= "") {
$ (' #content '). HTML (origcontent);
}
}
$ (document). Ready (function () {
$.history.init (loadcontent);
$ (' #navigation a '). Click (function (e) {
var url = $ (this). attr (' href ');
url = url.replace (/^.*#/, "");
$.history.load (URL);
return false;
});
});
}) (JQuery);
Package download