Jump to content

Jquery Conflict between Mega-Menu and MailChimp form

Recommended Posts

Hello Community!
Here’s a conundrum… I have two elements that I need on a page that just won’t play nice with each other: a mega-menu (required for the main site navigation) and a simple mailchimp signup form (in the footer).

See them both on this page here:


The problem is that the mailchimp form (in the footer) won’t accept submissions unless the following line is removed:

<script>var plugin_path = '/t4cms/';</script>

This code is however is needed by the mega-menu, so I have to keep it there.

If I remove the above line - then the Mailchimp form will accept submissions BUT the mega-menu is broken!

I have tried reordering the sequence of the .js files - that didn’t work.

Also, I have downloaded and stored locally the mailchimp js file: mc-validate-geary.js - so I can make any suggested edits directly in this file. I suspect the solution will be found by editing this file.

Any advice much appreciated!

Link to post
Share on other sites

Misplaced closing tag

<!-- mc-validate-geary.js / 499943 -->

<script type='text/javascript' src="/geary2020/t4media/mc-validate-geary.js"></script>


<script type='text/javascript'>

(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';fnames[3]='GDPR';ftypes[3]='radio';}(jQuery));var $mcj = jQuery.noConflict(true);


Link to post
Share on other sites

@dsonesuk Thank you for your reply. I have now removed that duplicated closing tag. The form is still broken though. I can see from Console that when I press 'Subscribe' it is trying to load mailchimp-action.php locally, and that is because of that plugin_path I mentioned in my first post above.

Link to post
Share on other sites

Thank you for your replies. It turns out there was ANOTHER reference to mailchimp js elsewhere that was causing the conflict. Through analysing the error via console I was able to locate it.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...