As discussed before, we can add Javascript/JQuery in Drupal modules.
Drupal – Create Javascript for Module
So if the Javascript/JQuery is related to the layout and independent of the module, we should add it in the theme instead. For example, i want to have a alert box whenever a page is loaded, i should then add it to my current Drupal theme. The steps are listed below.
1. Open you current theme folder and add the following line in the theme.info.
- scripts[] = js/theme.js
