My problem is quite simple, i would like to preload pages before showing them in a div
i've got a main div in my index page :#data_div
i load pages with lot of images into that Div ... (not only images, lot of markup too)
i use another div to preload the page, that div is not visible (but not hidden neither to keep good formatting of data loaded ) : #data_loading ;
i use a div for loading symbol :#wait_div
i think i need the ajax equivalent of JQUERY load (event, not load method ) but i can't set this event to a div (...) so i need another solution
$.address.change(function(event) {
$("#wait_div").show();
if(event.value == "/") {
$.address.value("index.php");
} else if(event.value.substr(1, 5) == "Datas") {
$("#data_loading").load(event.value, {
'ajax' : 'true'
},function(){
/* i would like that this occur only when the page is fully loaded
(including image and scripts) inside the temp div */
$("#data_div").children().remove();
$("#wait_div").hide();
$("#data_loading").children().appendTo($("#data_div")).fadeIn(1000);
//alert("done");
});
});
}
});