by Mary Evans.
I'll assume that your code is correct, but something you need to understand about Moodle is that it uses the cached data NOT current so if you have made changes added any code be it JS/HTML/CSS you need to Purge all caches by clicking on the link in Settings > Site Administration > Development > Purge all caches
If your code is correct you will know instantly, if it isn't then you will need to try and fix it.
EDIT: Opps I nearly forgot: you will also find some JS cache in your Moodle site's Moodledata directory. You can clean that out too for good luck!
Cheers
Mary