Created
June 4, 2013 13:05
-
-
Save weber/5705744 to your computer and use it in GitHub Desktop.
History.js события на кнопки «назад»«в перед»
This file contains hidden or 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
| window.History.Adapter.bind (window, 'statechange', function() { | |
| if (typeof History.Adapter.artificial != "undefined") {delete (History.Adapter.artificial); return} | |
| .... your code here ..... | |
| }) | |
| window.History.pushStateOriginal = window.History.pushState | |
| window.History.pushState = function (state, string, url) { | |
| window.History.Adapter.artificial = true | |
| window.History.pushStateOriginal (state, string, url) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment