Can anyone help me? I’m putting together an infographic within a sliding carousel and I’m getting the error “canvas is null”. I think I may have a few bits of code in the wrong place, but I’m having trouble working out which bits. I think it’s causing the SVG that’s supposed to appear in the background of each sliding <li> to not be displayed.
Can anyone work out what’s causing these problems? The page is here: http://weaver-wp.weavertest.com/radiation-infographic/
Thanks,
David
You are looping from 1 to 32, but there are only 31 canvas elements on the page. In the 32nd iteration,
document.getElementById('myCanvas_32')is returningnull, hence the error.