document.addEventListener("DOMContentLoaded", function () { var btn = document.querySelector("#menu-item-296"); // Your button with ID menu-item-296 if (btn) { btn.addEventListener("click", function (e) { e.preventDefault(); // Prevents the default button click action (if any) console.log("Mailchimp popup triggered"); // For debugging window.dispatchEvent(new Event("MailchimpPopupOpened")); // Trigger the Mailchimp popup }); } else { console.log("Button not found!"); // Debugging if the button ID is incorrect } });
Jesse Gates
I've seen first hand how much time and effort that has been put into this product. It works exactly as advertised and I do not have to worry about the trailer hitch hitting the split gate when pin/hitch is installed. Switch is worth its weight in gold. Highly recommend.