I want to display a 'loading' Icon or gif, with a completely black background (with transparency) (100% width and height) while loading some scripts (backstretch and JQuery Scrollbar). When those codes are loaded, I want the 'Gif Loading icon' and the black background to dissapear, and then show the entire and normal webpage. What do I have to do? Here you have the codes I'm using for those scripts.
BACKSTRETCH
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-backstretch/2.0.3/jquery.backstretch.min.js"></script>
<script>
$.backstretch([
"http://www.hqdiesel.net/gallery/albums/userpics/10004/iggy_hqdiesel130~0.jpg"
, "http://www.hqdiesel.net/gallery/albums/userpics/10004/iggy_hqdiesel128~0.jpg"
, "http://www.hqdiesel.net/gallery/albums/userpics/10004/iggy_hqdiesel143~0.jpg"
], {duration: 5000, fade: 750});
</script>
JQuery Scrollbar
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://danithemes.fanscity.eu/shugar/wp-content/uploads/2014/11/jquery.mCustomScrollbar.concat.min_.js"></script>
<script>
(function($){
$(window).load(function(){
$(".onliners, .packages").mCustomScrollbar();
});
})(jQuery);
</script>
Thank you so much! And I'm sorry for my english!