Hello, I am currently trying to modify a class css that a div uses with javascript, specifically, the background-color. I’m not really sure how I should be doing this.
[CODE]
<link rel=”stylesheet” type=”text/css” href=”style.css”>
<script type=”text/javascript”>
var pagecolor=new Array()
pagecolor[0] = “#FFFFFF”;
pagecolor[1] = “#FF0000”;
pagecolor[2] = “#99CCFF”;
function setpage(page) {
goto(page);
setStyleById(“footer”, “background-color”, pagecolor[page]);
}
</script>
I call this function with links like these:
[CODE]<a href=”javascript:setpage(1);”>MAKE IT RED!!</a>
and the div tag is as follows:
[CODE]<div class=”footer” align=”center”>I am in a colored box</div>
If you need more information, let me know. All help welcomed, links are fine too. Thanks!