Change DIV class on timeout with JavaScript
Posted: Sat Nov 29, 2008 10:00 am
So, I hope this is simple, I've spent the last hour trying to figure it out.
I want a DIV, currently that has two classes applied to it, to change to a different class after two seconds. So,
should, after two seconds, become:
Since this is simple, I can just apply it inline... (using onLoad?)
Also, is there a way I can simply remove a DIV from the page after two seconds?
Thanks all!
I want a DIV, currently that has two classes applied to it, to change to a different class after two seconds. So,
Code: Select all
<div class="class_one class_two">My Content</div>Code: Select all
<div class="new_class">My Content</div>Also, is there a way I can simply remove a DIV from the page after two seconds?
Thanks all!