In the code at the line marked as //Error in comments. I get Javascript error saying: "Cannot read property style of 'null'". I have no idea what it is not able to find the object. I have thought and tried everything. Please help. Here is the code:
Answer
You are executing your javascript code BEFORE the was actually created.
Also note that you did not close your
. with a corresponding
So move your javascript code to a part below your HTML. Or execute it after the page finished loading. If you are using JQuery you can do:
No comments:
Post a Comment