Jump to content

Jquery Conflict between Mega-Menu and MailChimp form


dara
 Share

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:

https://cms.ucd.ie/geary2020/research/

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 comment
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>

<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);

</script>

Link to comment
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 comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...