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.
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.
Comment | File | Size | Author |
---|---|---|---|
webform_mailchimp.js_.diff | 642 bytes | jschrab |
Comments
Comment #1
blackdog CreditAttribution: blackdog commentedAwesome, I was just trying to fix this in #1450206: Fields missing in 7.x version. Will look at the patch a.s.a.p.
Comment #2
blackdog CreditAttribution: blackdog commentedFixed this with a few alterations, since the top Behaviour didn't work either..
Comment #3
jschrab CreditAttribution: jschrab commentedThere's a stray...
...left in March 20th dev version of webform_mailchimp.js that might confound older versions of Internet Explorer
Comment #4
blackdog CreditAttribution: blackdog commentedThanks, fixed.
Comment #5
jschrab CreditAttribution: jschrab commentedNo problem - and thank YOU for Webform Mailchimp!