Skip to content
Chris Pietschmann edited this page Sep 1, 2017 · 8 revisions

Hash + Client-side Querystring

jHash has API's for easily working with the browsers "location.hash" and getting notified when that value changes. In addition to this notification, jHash also provides the ability to define a "root" hash value along with client-side "querystring" values specified directly in the "location.hash" value.

Routes

New in v2.0 jHash provides API's for easily defining Route patterns and adding callback methods that will get executed when the "location.hash" changes to a value that matches the specified Route pattern.

Hash Change Notification

jHash provides a cross-browser API for easily handling the HTML5 "hashchange" event. It even works in older browsers that do not natively support a "hashchange" or "onhashchange" event.

Code Examples

Here are some full code examples that use jHash in real world solutions.