What do you mean by « it’s not working »?
A common mistake when doing so is to call your javascript to early, when the DOM in not initialized.
If you speak french, this topic was discussed here: Aide sur JS block dans configuration avancee
Depending of what you try to achieve, it could be simplier to develop a plugin:
When you develop a plugin, you have serveral helper function, so you can be sure your javascript is called at the right time.