MailChimp Widget
escaping semicolons in scripts (1 post)

  1. rdmoore1000
    Posted 2 years ago #

    In the following script files:


    There is a semicolon at the beginning

    ;(function($) {


    ;(function(d) {

    respectively. I understand the purpose of doing this is to avoid concatenation to preceding scripts or with your preceding ajax call. However, it is causing conflict with other plugins. I am not sure why, but I think it is related to a jQuery shortcut conflict.

    Besides, you should probably use wrap your code in:

    jQuery(document).ready(function($) {
    // $() will work as an alias for jQuery() inside of this function

    since there is no reason to have your code running before DOM is ready. (unless the user can fill out your form really really fast)

    here is the wordpress standards:

    If everybody uses these, we'll all be fine.

    I spent hours looking for the dreaded ';'. With debugging software, I haven't had to do that for about 15 years. Usually it was because it was missing, but not in this case ;o)

    The plugin it conflicted with was superfish, and one of my own.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • MailChimp Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic