Add some nice defaults for jQuery ajax
This commit is contained in:
parent
08454ab7fa
commit
aafec2c50f
@ -465,6 +465,15 @@ jQuery.viewportHeight = function() {
|
|||||||
document.body.clientHeight;
|
document.body.clientHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Automatically use format.js for jQuery Ajax
|
||||||
|
jQuery.ajaxSetup({
|
||||||
|
'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Show/hide the ajax indicators
|
||||||
|
jQuery("#ajax-indicator").ajaxStart(function(){ jQuery(this).show().css('z-index', '9999'); });
|
||||||
|
jQuery("#ajax-indicator").ajaxStop(function(){ jQuery(this).hide(); });
|
||||||
|
|
||||||
/* TODO: integrate with existing code and/or refactor */
|
/* TODO: integrate with existing code and/or refactor */
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user