Assuming that your sub-theme name is
- Update your
example/example.info to have this
scripts = js/custom.js. That means the
custom.js path is
- Clear the cache.
If your code in
custom.js is not working then there is something wrong. First, check if there is a js error using browser console. Second, check the
http response code make sure that there is no permission issue.
drupal_add_js. With this API you can control which page the js is going to load.