Skip to content

Instantly share code, notes, and snippets.

@vparihar01
Created March 30, 2012 08:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vparihar01/2249305 to your computer and use it in GitHub Desktop.
Save vparihar01/2249305 to your computer and use it in GitHub Desktop.
Loading Screen for Ajax request using jQuery.blockUI.js
jQuery(function(){
$.ajax({
async:true,
type:'get',
beforeSend:function(request) {
$.blockUI({ css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: .5,
color: '#fff'
}});
},
complete:function(request, json) {
},
url: url,
dataType: 'json',
success: function(data){
$.unblockUI()
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment