Friday, April 26, 2013

jQuery History Plugin, enable browser back button


There are a few different jQuery history plugins out there is one better than any of the others...
I'm trying to decide which one to go with, any thoughts or any others to try:
share|edit
1 
I know this is an old thread but I found one that worked really well for me: github.com/devote/HTML5-History-API – KO. Nov 28 '12 at 19:07
up vote18down voteaccepted
I'm not exactly sure what you are trying to do, but I'm assuming you want to use hash tags to control page loads like Twitter and Facebook.
If that's the case check out this post: What is the best back button jQuery plugin?
Edit:
Here's what was suggested on that post:
Personally, I'd suggest going with Ben Alman's jQuery BBQ as it is cross-browser and very easy to use. Basically:
$(window).bind('hashchange', function(e) {
    // Get the hash (fragment) as a string, with any leading # removed. Note that
    // in jQuery 1.4, you should use e.fragment instead of $.param.fragment().
    var url = $.param.fragment();
});
Another popular one is Sammy.js (http://code.quirkey.com/sammy/) this is actually what Twitter uses.
  • Christian
share|edit
As cool as Asual looks, for my use it looks like a bit of overkill. Hence for this project I went with BBQ. Thanks.– vdh_ant Dec 6 '10 at 15:59

No comments:

Post a Comment