Add javascript files in the template.php – Drupal 7

In template.php

function theme-name_preprocess_html(&$variables) {
  $options = array(
    'group' => JS_THEME,
  );
  drupal_add_js(drupal_get_path('theme', 'theme-name'). '/script.js', $options);
}
Categories: Drupal Tags: , , , , ,
%d bloggers like this: