Javascript onclick needs to be clicked twice for function to run. I need it to run on the first click, That is my problem. I’ve googled and searched for 2 days now without finding a reply that worked or that I understood.
The code for the javascript can be found here: http://enji.se/windows8/js/script.js
And the site where I want it to work: http://enji.se/windows8/
It’s a Windows 8 looking website I’m trying to make. It will only display correctly on Google Chrome and on a resolution higher then 1265×820 and will be awesome on resolutions higher then 1590×920
Thank in advance / enji
SOLVED
The problem is inside your click handler
boxBegin– the click event is received and passed to your method correctly on the first click, but insideboxBeginyou are switching behaviour on the value ofbox.style.display– in IE9 this is initially “”, which triggers your close code rather than the open code you want.Change boxBegin to: