Created
June 1, 2012 21:43
-
-
Save JonAbrams/2855320 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof history.pushState === "undefined") { | |
// Refresh the page to the new URL if pushState not supported | |
location.href = new_path | |
} | |
history.pushState({ | |
old_text: old_text.val(), | |
new_text: new_text.val(), | |
slug: new_path | |
}, null, new_path); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment