I am putting my basic projects on github pages, and my javascript does not seem to run. I searched extensively to try and solve this problem.
Basically, I have onclick = function()
events in my HTML divs.
I also have javascript which saves DOM elements into variables like so.
var selectorX = document.getElementById("X");
var selectorO = document.getElementById("O");
When I log into my console, I keep getting messages like selectorX is null
, and selctorO is null
, etc.
This tells me that the javascript variables are not properly storing the html elemnets in the cache.
Does anyone have a familiarity with this problem?