Skip to content

Instantly share code, notes, and snippets.

@kaizau
kaizau / jquery.pathchange.js
Created May 29, 2011 21:59
Bugfix for [bcherry's](https://github.com/bcherry) pathchange proof of concept (IE needs quotes on attribute selectors - lines 66, 74)
// Plugin that provides a "pathchange" event on the window object, notifying an application when the URL changes
// This is accomplished by watching the hash, using the hashchange event from HTML5 or a polling interval in older browsers.
// In addition, in some modern browsers, HTML5 History Management is used to support changing the URL's path without reloading the page.
// This plugin also provides a method to navigate to a URL safely, that will use HTML5 History Management to avoid a page load.
// Everything degrades gracefully, and supports RESTful client development.
// Browser Support:
// Chrome - Any recent version of Chrome supports everything.
// Safari - Any recent version of Safari supports everything.
// Firefox - Newer versions of Firefox support the hashchange event

Keybase proof

I hereby claim:

  • I am kaizau on github.
  • I am kz4 (https://keybase.io/kz4) on keybase.
  • I have a public key whose fingerprint is 5969 BE1C E3FA D618 0487 D939 998A EE0F 9590 107A

To claim this, I am signing this object: