Skip to content

Instantly share code, notes, and snippets.

@pavelkucera
Created July 22, 2012 09:34
Show Gist options
  • Save pavelkucera/3159066 to your computer and use it in GitHub Desktop.
Save pavelkucera/3159066 to your computer and use it in GitHub Desktop.
$.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();
$.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