Fires user defined callbacks when the hash for the page changes, including when 'back' and 'forward' on browser history are used. This also works for IE6 and IE7.
IE6/7 Fallback stuff based loosely on code from "jQuery BBQ" by Ben Alman.
Unlike jQuery BBQ, no jQuery is required and no parsing is done of the hashes just yet.
$ component install charlottegore/hashchange
Adds a function to be called when the hash changes.
require('hashchange').update(function( hashFragment ) {
console.log('hash is now ' + hashFragment )
})
Fires all hashchange callbacks immediately.
Unbinds the callback so that it is no longer called.
MIT