I have a jQuery plugin that I authored and I want it on only one node of my Drupal 6 web site. I have FTP and a Linux shell I can use for uploading files to the site, but the issue is actually attaching them to a node. Putting JavaScript in a node’s Body can get pretty ugly, especially when the Body is presented in a WYSIWYG editor (haywire indentation, WYSIWYG attempting to wrap all my <script> tags with <p> tags, etc)
Is there any sort of Drupal plugin or any kind of workaround to make this kind of integration easier?
Edit:
I’ve tried Code Per Node, which is great for separating JavaScript from the Body, but I really need the option to link to separate JavaScript files (this plugin requires several support files).
The best way would be to make your own module that uses the plugin. That is the “Drupal” way to do it. You can also you drupal_add_js to attach scripts to the module. If it is only a specific node you need to attach this plugin to I would either make a if statement in the template looking for that node, kinda an ugly way to do it though.