Hello guys,
I got this JS from your support last year:
/* Scroll Offset */
(function($){
$('#menu-header-kurse.x-menu .x-anchor-menu-item').off().on('click touchstart', function( e ){
e.preventDefault();
var section = $(this).attr('href').split("#").slice(-1)[0];
console.log(section);
if ( section || section != '' ) {
var xbar = $('.x-bar').outerHeight();
var yloc = $('#' + section + '').offset().top - 114;
console.log('x bar: ' + xbar);
console.log($('#' + section + '').offset().top);
setTimeout( function() {
$('html, body').stop().animate({
scrollTop: yloc
}, 850, 'linear');
}, 250 );
}
});
})(jQuery);
Now, with Pro 2, this code does not work anymore. I think its because we have no ID. How to get this code work again? Can you help me with this?
Thanks and Best,
Robert
