I basically have something like this:
<div id="slide-1" style="display:none;">
Not too important stuff
</div>
<div id="slide-2">
Important stuff
</div>
<script>
$('#slide-2').hide(0,function(){
$('#slide-1').fadeIn();
});
</script>
However, “slide-2” is showing up for about half a second before the jQuery is executed, and the files are all on my computer. If someone else views it, the delay would be long. How can I prevent the user from seeing “slide-2”?
Don’t use jQuery for hiding that little div. The delay may be due to the browser waiting for jQuery to download. Use simple javascript right after it like so: