0
How to compel work scripts after loading page?
"place scripts under </body>" - don't work "place scripts after </body>" - don't work. I'm tired :( Help me, please. I'm trying to do some animation and i need to find out width of my element through getComputedStyle, but it's don't work, because scripts loads before loading page. :( *crying* var menuWidth = getComputedStyle(btnStart[0].style.width, '') TypeError: failed to execute 'getComputedStyle' on 'window': parameter 1 is not of type 'element' i close to understand it. *don't crying*
1 Resposta
+ 2
window.onload = function () {
// your code here
}