Drupal 7 mandates the jQuery $ object be wrapped in a closure.

jQuery(document).ready(function($) {
  // Code that uses jQuery's $ can follow here.
});

...not...

$(document).ready(function() {
  // Code that uses jQuery's $ can follow here.
});

For reference - https://drupal.org/node/171213 (section "JavaScript closures")

Patch attached.

CommentFileSizeAuthor
webform_mailchimp.js_.diff642 bytesjschrab
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

blackdog’s picture

Status: Active » Needs review

Awesome, I was just trying to fix this in #1450206: Fields missing in 7.x version. Will look at the patch a.s.a.p.

blackdog’s picture

Status: Needs review » Fixed

Fixed this with a few alterations, since the top Behaviour didn't work either..

jschrab’s picture

There's a stray...

console.log('sd');

...left in March 20th dev version of webform_mailchimp.js that might confound older versions of Internet Explorer

blackdog’s picture

Thanks, fixed.

jschrab’s picture

No problem - and thank YOU for Webform Mailchimp!

Status: Fixed » Closed (fixed)

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