Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use jQuery to show a div in 5 seconds

Tags:

jquery

I want to fade in a div on my website in 5 seconds. Also, I dont want to use css Display:none to hide the div, because this div is very important and I'm thinking if the user doesnt have JS enabled, the div will be hidden forever. So can you guys please tell me how to hide the div on website load and make it visible in 5 seconds? Thanks heaps.

<div id="lead_form"></div>
like image 244
nasty Avatar asked Nov 28 '22 17:11

nasty


1 Answers

setTimeout(function(){
   $('#lead_form').show();// or fade, css display however you'd like.
}, 5000);
like image 139
Glorious Kale Avatar answered Dec 11 '22 14:12

Glorious Kale