Created
July 22, 2012 09:34
-
-
Save pavelkucera/3159066 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
$.nette.ext('page', { | |
load: function() { | |
for (var i in this.callbacks) { | |
var callback = this.callbacks[i]; | |
callback(); | |
} | |
} | |
}, { | |
callbacks: [], | |
register: function(callback) { | |
this.callbacks.push(callback); | |
callback(); | |
} | |
}); | |
// Initialize AJAX | |
$.nette.init(); |
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
$.nette.ext('page').register(function() { | |
// this is called right now | |
// and after every ajax request | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment