I have this javascript on my page to toggle a div and switching between two images
<script type="text/javascript">
fuction toggleArchiv() {
document.getElementById('cat').toggle();
var image = document.getElementById('arrow');
if (image.src == 'bullet_arrow_down.png')
{
image.src = 'bullet_arrow_up.png';
}
else
{
image.src = 'bullet_arrow_down.png';
}
}
</script>
Works fine on modern browsers, but IE keeps saying there is an error at that line
document.getElementById('cat').toggle();
So it doesn't toggle the div and neither switches the image. What to do?