There's a "custom.js" file in the js folder which is being included via the zurb-foundation.info file.

There's 2 problems with this: first of all this theme is supposed to be used as a base theme and editing it directly is technically hacking it so if we want to include some custom boilerplate js for the user let's do that in the subtheme please!

Also, the custom.js file uses a jQuery document ready approach, whereas the more appropriate way would be to have a Drupal.behaviors block wrapper inside a closure, like custom modules do.

Thanks!

Comments

alexweber’s picture

Status: Active » Needs review
StatusFileSize
new1.99 KB

Patch attached that does all of the above:

  • Removes custom.js from base theme
  • Remove line in zurb-foundation.info that includes custom.js
  • Alter STARTER/js/script.js to use a Drupal-style closure and behavior instead of jQuery ready
  • Alter drush command to replace the new behavior name with the theme's machine_name
kevinquillen’s picture

Status: Needs review » Fixed

Good work. Committed to dev.

alexweber’s picture

Awesome, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.