hello I have two div on my page.
<div id="adsense" style="display:block">some stuff</div>
<div id="timeout" style="display:none>Some stuff</div>
I have a variable var type.
The page on which these two div’s are loads two times. First time the type=0. At this time i want to show the <div id="adsense">. Then the page goes to other pages and when the page loads second time the type becomes 1.
Now what I want is at first page load the <div id="adsense"> to be shown. When page reloads type becomes 1 I want to show the <div id="timeout"> for 9 seconds and then again switch to first div.
I want to know how can I do that? How can I embed if condition in it.
I hope I understood correctly:
This can of course be optimized, its mainly for understanding how it works.