Build and fix Seb's answer. If you are blocking the user interface, use .blockUI (), and if .block () is used to target the object. I do not believe that you need to target the body, in fact, what the blockUI function does on itself. You need to call the function after the body tag ... otherwise there is no <body> . If you really want the user interface to be locked before each image is loaded, see the last line. If you want the contents of the page to load, you can put the unlock function at the bottom of your friend $(document).ready(function().
<script type="text/javascript"> $("body").block(options); </script> <script type="text/javascript"> $(document).ready(function() { $(window).load(function() { $.unblockUI(); }); </script>
Ecropolis
source share