> I would like to blockUI on body onload like: > > <body onload="$.blockUI({ message: null });"> > > and when document ready finishes unblock, but unfortunately i can not > unblock it if I put blockUI on onload of body. > > My page makes few ajax calls and some processing on document ready, > and i want to blockUI until page finishes loading completely. > > Is there a solution, or a workaround?
Why can't you unblock it? It's recommended that you do not use an inline event like onload. Instead, use jQuery's ready event: $(document).ready(function() { $.blockUI({ message: null }); // do stuff $.unblockUI(); }); Except in your case, $.unblockUI is probably called from an ajax callback.