What's the best library to do a URL hash/history in JQuery?

TIMEX picture TIMEX · Mar 1, 2010 · Viewed 20.9k times · Source

I've been looking around JQuery libraries for the URL hash, but found none that were good. There is the "history plugin", but we all know it's buggy and isn't flexible.

I am loading my pages inside a div. I'll need a way to do back/forward along with the url hashing.

mydomain.com/#home
mydomain.com/#aboutus
mydomain.com/#register

What's the best library that can handle all of this?

Answer

Matt Frear picture Matt Frear · Mar 1, 2010

I recently looked at 3 different plugins - jquery history plugin, history, and jQuery BBQ.

They were all quite hard to setup, I did get jQuery.history working but it still had problems with IE7. So I changed to BBQ and it worked fine across all our target browsers (IE6, IE7, IE8, Fx3).

So I recommend the jQuery BBQ plugin.

Edit: here's a blog post I just wrote which demonstrates jQuery BBQ with cascading dropdowns.