onClick event doesn't work on initial homepage load

edit: I just tried on a different browser and started on a different page than the home page. The onClick event did NOT work on that initial page load, but going to another page triggered it to work properly. But then I clicked on the home page and it didn’t work. Clicking to another page and then BACK to the home page made the onClick event to work. Something weird is going on. Maybe it is the order of the buttons and/or how they’re stacked on top of each other. Any suggestions are appreciated.