Plugins

User login
Can't find a Plugin?

Can't find a Plugin you are looking for? Check out the jQuery Wiki page.

Are you a plugin developer? Please move your plugin over to this site.

Website Bug or Feature Request?

Found a bug on the new jQuery Plugin website? Have a feature request?

Submit it to the jQuery Plugin website issue queue to ensure it is noticed!

jHistory


Average rating
(3 votes)

Allows for browser forward/back button support through the use of hidden IFRAME. The user will not be hindered by any location.href changes and odd links that appear in the browser's location bar. This does not allow bookmarking.

The main advantage of this over the current History plugin, the jQuery UI History plugin or any javascript-based browser history functionality that harnesses the Location Hash fragment method is specifically for e-commerce driven AJAX functionality. This hides individual history fragments from the user's view and prevents specific fragments from being bookmarked.

This supports the storage of any javascript object for each history event fired and the automatic execution of a callback function if the forward/back button was hit. This is well suited for e-commerce AJAX applications for handling such events as adding a product to the cart with a history event written and allowing the user to hit the back button to then remove the product from the cart or reinstate the shopping cart from the previous history event.

To use:

  • Simply include op top of the jQuery core to automatically load the jHistory plugin:
    <script language="JavaScript" type="text/javascript" src="jquery.js"></script>
    <script language="JavaScript" type="text/javascript" src="jquery.history.js"></script>
  • To save an event in history with the current state of the object you want saved:
    $.history( currentObject );
  • You must declare a callback function to be fired upon forward or back button being clicked to handle the new incoming stored history object:
    $.history.callback = function ( reinstate, cursor ) {
    alert('now the value is: ' + reinstate);
    };

Releases

Official releasesDateSizeLinksStatus
0.3.02008-Jul-17n/aRecommended for 1.2.xThis is currently the recommended release for 1.2.x.