How do I add a CSS style to a window.addEventListener()?

bepemula

New Member
In my HTML, I have a section in which I have JavaScript that adds an event listener which runs my game:\[code\]<div class="content"><script> window.addEventListener('load', Game.start);</script></div>\[/code\]How do I make it so that the JavaScript is contained within the div above it? When it shows, the game is completely outside of it.I'm using the crafty.js framework.Documentation here:http://craftyjs.com/api/
 
Back
Top