I read the description of the superfish options here

http://users.tpg.com.au/j_birch/plugins/superfish/#options

and I understand the technical stuff but I am wondering as a matter of best practices (and having it actually work), where do I put my JS code configuring the options if, for example, I wanted to change the delay on mouseout or the animation speed, etc.? Do I add it to page.tpl.php, template.php, a custom module file, or some other place? Thanks in advance.

Comments

Jeff Burnz’s picture

Well, it were me, I would just adjust the js file that comes with the theme (save a backup first), seems the easiest route to me.

MikeBC’s picture

Yeah that was my backup plan but the mantra here at drupal (and in all honesty the better practice) seems to be don't hack existing files, override them . . .

I am not an expert in JS so I am wondering if I use drupal_add_js in template.php will it override the settings in the JS file that comes with the theme?

Jeff Burnz’s picture

Just try stuff like that, in all honesty I cant remember how I did this, it was about a year ago...

They mean dont hack core (as in drupal core) theme is a free for all in my book.