The script has been there a long time, so I didn’t think of that as the cause.
- I removed the script that you pointed out needed deleted. I then cleared browser cache and also style cache, however Cornerstone still gave the same error.
- I reverted to X Child Theme from Pro but that made the whole site go down so I switched back.
- I removed the last two custom elements entirely from JS (hotjar and salesforce web to ead) saved, cleared cache, tried again with same problem.
Current code in Custom JS is:
’ // DISABLE CREATIVE CALL TO ACTION
jQuery(function() {
jQuery(".disable-ccta .x-creative-cta").attr(“href”, “#55”);
});
// SOMETHING TO DO WITH THE PROMO ELEMENT
jQuery(’.home .x-promo’).each(function(){
jQuery(this).find(‘img’).wrapAll(’’)
});
// CLICK CONTENT BAND TO REDIRECT TO VERY FIRST CHILDS URL
jQuery(function($){
$(’.x-content-band.hyperlink, .x-section.hyperlink’).css({cursor:‘pointer’}).click(function(e){
window.location = $(‘a:first-child’, $(this)).attr(‘href’);
});
});
jQuery(".clickablerow").wrap("");
jQuery(".clickablerow2").wrap("");
jQuery(".clickablerow-rescue").wrap("");
jQuery(".clickablerow-educate").wrap("");
jQuery(".clickablerow-disciple").wrap("");
jQuery(".clickablerow-empower").wrap("");
// ADD SCROLL-DOWN LINK
jQuery(function($){
$(’.smooth-scroll’).click(function(e){
e.preventDefault();
var adminbar = 0;
if ( $('#wpadminbar').length > 0 ){
adminbar = $('#wpadminbar').height();
}
console.log(adminbar);
console.log($('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - ($('.x-navbar').height() + adminbar));
$('html,body').animate({
scrollTop: $('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - ($('.x-navbar').height() + adminbar)
},700 ,'swing');
});
});
// NATIVE X MENU DROPDOWN ON HOVER
jQuery(’.x-nav-wrap li’).on(‘mouseenter mouseleave’, function() {jQuery(this).find(’.x-sub-toggle’).first().trigger(‘click’);});
//HOTJAR tracks visits
(function(h,o,t,j,a,r){ h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)}; h._hjSettings={hjid:542256,hjsv:5}; a=o.getElementsByTagName(‘head’)[0]; r=o.createElement(‘script’);r.async=1; r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild®; })(window,document,’//static.hotjar.com/c/hotjar-’,’.js?sv=’);
//Salesforce Web-To-Lead script for form
function timestamp() { var response = document.getElementById(“g-recaptcha-response”); if (response == null || response.value.trim() == “”) {var elems = JSON.parse(document.getElementsByName(“captcha_settings”)[0].value);elems[“ts”] = JSON.stringify(new Date().getTime());document.getElementsByName(“captcha_settings”)[0].value = JSON.stringify(elems); } } setInterval(timestamp, 500);’