I am using a zen subtheme and I am trying to add some javascript using the drupal_add_js on a certain node. When I use the drupal_add_js from within the html--node--XX.tpl.php file, it does not work.
But when I use it in the page--node--XX.tpl.php it does. I don't understand what causes the difference in the behavior. I thought that this would be the same. These are the lines I am adding in both cases:
drupal_add_css("sites/all/libraries/shadowbox/shadowbox.css", $type = 'file', $media = 'all', $preprocess = FALSE);
drupal_add_js("sites/all/libraries/shadowbox/shadowbox.js", array('type' => 'file', 'scope' => 'header', 'weight' => 5));
drupal_add_js("Shadowbox.init({skipSetup: true});", array('type' => 'inline', 'scope' => 'header', 'weight' => 6));
Can anyone illuminate me here?