Good all the time of day

On the page there is something which object (picture, table ... does not matter). When the page is loaded, the hunt is not to show this object, but to show it with a delay with the specified time interval (3 seconds). Well, ideally, what else would the object itself appear not instantly, but say 1 second. Tell me how to implement this?

  • setTimeout and fadeIn to help you - Specter

2 answers 2

If you use jQuery, then:

 $(function(){ // сработает, когда документ загрузится $('#someID').delay(3000) // пауза в 3 сек. .show(1000); // появление элемента в течении 1 сек. }); 

    Or you can use setTimeout() . settimeout

    How convenient it will be.

    • setTimeout () does not smoothly show, but after a certain time it will immediately show the object and there will be no effect. In order to smoothly write a function, or use JC. - markuper
    • Ah, excuse me) You said with a delay, here's a delay for you, Well, as soon as it appears, you can determine it in the called function, even if a naked girl appears first, and then your information) I told you, as an option) - shanhaichik