Hmm... setInterval does look like what I need, but it's not working...
Here's my entire page (without the new setStuff):
Code:
<script type="text/javascript">
function change(box,css,value) {
document.getElementById(box).style[css] = value;
}
</script>
<div id="thabox"><p>Tha Box!</p></div>
<input type="button" value="1" onclick="change('thabox','background','blue')" />
<input type="button" value="2" onclick="change('thabox','width','150px')" />
<input type="button" value="3" onclick="change('thabox','height','150px')" />
<input type="button" value="4" onclick="change('thabox','color','white')" />
<input type="button" value="5" onclick="change('thabox','padding','10px')" />
<input type="button" value="6" onclick="change('thabox','font-size','30px')" />
<input type="button" value="7" onclick="change('thabox','text-shadow','#ff0000 2px 2px 5px')" />
<input type="button" value="8" onclick="change('thabox','-webkit-border-radius','25px')" />
<input type="button" value="9" onclick="change('thabox','-moz-border-radius','25px')" />
<input type="button" value="10" onclick="change('thabox','font-family','Arial')" />
<input type="button" value="11" onclick="change('thabox','margin-left','200px');" />
<input type="button" value="12" onclick="change('thabox','background','blue')" />
Last edited by Physicsguy; 04-08-2010 at 08:50 PM..
|