I am currently coding this site: [url]http://www.ndsu.edu/pubweb/~ruowang/lunchbytes/
and I met the problem of making only one of the sidebars having the mouse over effect. I want all the three sidebars(class calendar, schedule, printable poster) have the mouse over effects. What’s wrong with my code??
Thank you for your help!
The javascript codes:
<script type=”text/javascript”>
function mouseOver()
{
document.getElementById(“b1″,”b2″,”b3″).src =”image/redcalendar.jpg”, “image/redschedule.jpg”,”image/redposter.jpg”;
}
function mouseOut()
{
document.getElementById(“b1″,”b2″,”b3″).src =”image/calendar.jpg”,”image/schedule.jpg”,”image/poster.jpg”;
}
</script>
The html:
<div id=”sidebar”>
<ul>
<li><a href=””><img id=”b1″ src=”image/calendar.jpg” alt=”” border=”0″onmouseover=”mouseOver()” onmouseout=”mouseOut()” /></a></li>
<li><a href=””><img id=”b2″ src=”image/schedule.jpg” alt=”” border=”0″ onmouseover=”mouseOver()” onmouseout=”mouseOut()” /></a></li>
<li><a href=””><img id=”b3″ src=”image/poster.jpg” alt=”” border=”0″ onmouseover=”mouseOver()” onmouseout=”mouseOut()” /></a></li>
</ul>
</div>