Forum

jquery settimeout f...
 

[Solved] jquery settimeout function for show hidden div


(@rahul)
Active Member
Joined: 2 years ago
Posts: 6
Topic starter  

Hi,

On html page I have hidden div I want to show that div after 20 sec of page loading. Please help me to show div after 20 sec.

div id is 'hiddendiv'

Thanks in advance.


   
Quote
(@niraj)
New Member
Joined: 2 years ago
Posts: 4
 

You can use settimeout function of Javascript to show hidden div.

Basically I assume that you have div which having style of display none. Like below code

<div id="hiddendiv" style="display: none;">
	hidden div data
</div>

Now I am writing code of showing hidden div after 20 sec.

setTimeout(showHiddenDiv, 20000);
	function showHiddenDiv()
	{
		$('#hiddendiv').show();
	}

In above code, I have wrote settimeout function of javascript, this function will execute ShowHiddenDiv function which will show your hidden div.


   
ReplyQuote
(@rahul)
Active Member
Joined: 2 years ago
Posts: 6
Topic starter  

@niraj Thanks.


   
ReplyQuote
Share: