X Theme 9.1.4 Anchor Links Overshoot

I’m having the same problem as some Pro users where the anchor links to section IDs overshoot the headline, but in X Theme 9.1.4. I’ve tried disabling plugins, etc., but no change. Is there an update to correct this soon?

Thanks in advance.

Hello @comstarsupport,

Thanks for writing to us.

In order to help you with your concern, we need to check your settings so I would request you please share your admin login details meanwhile I would recommend you troubleshoot with a few of the common issues before we investigate your settings.

If it doesn’t work, please send your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts

Thanks

Hey @comstarsupport,

You are having an issue with the anchor links because of this JS error on the page:

Uncaught TypeError: $ is not a function
    at BrowserDetection ((index):635)`

The issue is coming from your custom JS code. You have added this broken JS code:

function BrowserDetection() {
var browserID = detectIE();
if (browserID == 11 || $(window).width() < 992) {
document.getElementById('triFlipbox').style.display = 'none';
document.getElementById('triImage').style.display = 'block';
}
else {
document.getElementById('triFlipbox').style.display = 'block';
document.getElementById('triImage').style.display = 'none';
}
//alert(browserID);
//onload="javascript:document.getElementById('loader').style.visibility='hidden';document.getElementById('loader').style.opacity='0';"
}
window.onload = BrowserDetection;
//document.onload = detectIE;
function detectIE() {
var ua = window.navigator.userAgent;
// Test values; Uncomment to check result …
// IE 10
// ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';
// IE 11
// ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';
// Edge 12 (Spartan)
// ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';
// Edge 13
// ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586';
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
// IE 10 or older => return version number
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
//alert(parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10));
}
var trident = ua.indexOf('Trident/');
if (trident > 0) {
// IE 11 => return version number
var rv = ua.indexOf('rv:');
return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
//alert(parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10));
}
var edge = ua.indexOf('Edge/');
if (edge > 0) {
// Edge (IE 12+) => return version number
return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
//alert(parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10));
}
// other browser
return false;
//alert('false');
}

Be advised that when you use $ in a JS code, you should have been define it first. The correct jQuery function would look like this:

(function($) {
	function my_function_name(){
		// will something here
	}

	$(window).load(function(){
		// something will be done here
	});
})(jQuery);

We highly recommend that you correct the custom JS code. If you are not the creator of the script, please seek assistance to the one who created script because it is throwing JS errors that affect the rest of the theme’s features.

Kindly let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.