<div id="dialog"><img src="images/load.gif"/></div>
I have this gif that plays before document.ready, and i’m trying to close it after the page is ready. I have tried:
<script type="text/javascript">
$("#dialog").dialog('option', 'dialogClass', 'alert'); //show dialog modal while page is loading
$(document).ready(function() { //document is ready, close loading gif
$("#dialog").dialog('destroy');
This code works but it doesn’t remove the loading gif, it still shows on the page. I have tried adding $('#dialog').remove() but this seems to ‘break’ my page by not letting the rest of the page execute.
how can i remove this dialog when the page is ready?
in your css