Oscar Oscar - 2 months ago 15
jQuery Question

Auto show div after few seconds javascript

I just want a simple div that contains some images to show after a certain amount of seconds or minutes. im using a basic bootstrap site.

Answer

Try this: https://jsfiddle.net/L9fe0py3/6/

I used jQuery

HTML:

<div id="thisDiv" style="display:none;">
<img src="http://bxslider.com/images/home_slides/hillside.jpg" style="width:100%;height:100%"/>
</div>

Javascript:

$(document).ready(function() {
setTimeout(function(){
$('#thisDiv').fadeIn();
}, 2000);
});