Use jQuery to show a div in 5 seconds

2020-06-27 00:33发布

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>

标签: jquery
7条回答
孤傲高冷的网名
2楼-- · 2020-06-27 01:21

The below code worked for me, if you are intending to show the Div for a few seconds...

$('#divInfo').fadeIn("fast", function(){        
        $("#divInfo").fadeOut(4000);
    });
查看更多
登录 后发表回答