document.addEventListener("DOMContentLoaded", function() {
if (document.querySelector(".accordion") !== null) {
const acc = document.getElementsByClassName("accordion");
// Here the accordion can close all tabs
for (let i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function () {
if (!this.classList.contains("active")) {
closeAccTabs();
toggleAcc(this);
console.log("Non Active");
} else {
closeAccTabs();
console.log("Active");
}
});
}
// If you want one block in accordion to be always open
// for (let i = 0; i < acc.length; i++) {
// acc[i].addEventListener("click", function () {
// closeAccTabs();
// toggleAcc(this);
// });
// }
// Open/close tab
function toggleAcc(e) {
e.classList.toggle("active");
var panel = e.nextElementSibling;
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
} else {
panel.style.maxHeight = panel.scrollHeight + "px";
}
}
// Closing an open accordion tab when clicking on another one (if needed)
function closeAccTabs() {
for (let i = 0; i < acc.length; i++) {
if (acc[i].classList.contains("active")) {
acc[i].classList.remove("active");
acc[i].nextElementSibling.removeAttribute("style");
}
}
}
// When resizing - auto-height adjustment
window.addEventListener(
"resize",
function () {
for (let i = 0; i < acc.length; i++) {
if (acc[i].classList.contains("active")) {
acc[i].nextElementSibling.style.maxHeight =
acc[i].nextElementSibling.scrollHeight + "px";
}
}
},
true
);
}
// Find the anchor element with the specified location and class
const anchorElement = document.querySelector('.page-id-17726 .menu-item-16935 a');
// Check if the anchor element is found
if (anchorElement) {
// Change the href attribute of the anchor element
anchorElement.href = 'https://creation.jumpermedia.co/';
}
});
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '992309357572442');
fbq('track', 'PageView');
document.addEventListener("DOMContentLoaded", function() {
// Replace these selectors with your specific CTA button selectors
var ctaSelectors = [
'.page-id-17726 .menu-item-16935 a',
'#hero-banner-v .editing-now',
'.last-sign-up .sign-up-button a',
'.page-id-17726 .cntct-us-btn-style .vc_btn3'
];
ctaSelectors.forEach(function(selector) {
var buttons = document.querySelectorAll(selector);
buttons.forEach(function(button) {
button.addEventListener('click', function() {
// Trigger the Facebook Pixel event on CTA button click
fbq('track', 'CTAButtonClick');
});
});
});
});
.cntct-us-btn-style {
float: right !important;
}