Possible Duplicate:
How to add CSS and JS files on node pages from theme's template.php

I have a content type that has involves some js magic for every node. How can I code it into template.php so that it is loaded only on display of the content type? I don't want the js to load uselessly on every page. My php skills are pretty shallow.

  • See the responses to the question I linked to in the above comment. – Laxman13 Oct 24 '11 at 18:54

js_injector module lets you control which pages you want to include your code.

CSS_injector does the same for css.

Not the answer you're looking for? Browse other questions tagged or ask your own question.