Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedWell, 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.
Comment #2
MikeBC CreditAttribution: MikeBC commentedYeah 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?
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedJust 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.