hashchange

hash change event handler thingy

hashchange

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.

No jQuery required.

Browserify

$ npm install --save hashchange

Component

$ component install green-mesa/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.

Manually set the hash fragment to something

MIT