CSS を変更する必要がない場合は、次のようになります。
$("<div />").css({
position: "absolute",
width: "100%",
height: "100%",
left: 0,
top: 0,
zIndex: 1000000, // to be on the safe side
background: "url(/img/loading.gif) no-repeat 50% 50%"
}).appendTo($(".container").css("position", "relative"));
$("<div>Loading...</div>").css({
position: "absolute",
width: "100%",
height: "100%",
top: 0,
left: 0,
background: "#ccc"
}).appendTo($(".container").css("position", "relative"));
.container {
border: 1px solid;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<div class="container">
A lot of content here ...
</div>
デモ: http://jsfiddle.net/jKfTC/