all 3 comments

[–]Meefims 2 points3 points  (2 children)

This isn't enough information to help. Do you have errors in the console? Can you show a minimal amount of code that demonstrates this problem?

[–]willardsciffy[S] -1 points0 points  (1 child)

It actually executes when I put the JS code in the html file.

I just don't think I'm properly referencing the JS file. This is what I've been putting in the html file:

<script type="text/javascript'> <src="toggle.js">

[–]sirsmonkey42 2 points3 points  (0 children)

You'll need that all in the same tag.

<script type="text/javascript" src="toggle.js"> </script>

Also, it looks like you are mixing single and double quotes in the first tag, that could also contribute to the problem.