Hi @core365,
It should be okay now, it’s the Wordpress update that breaks your code in which jQuery library animation no longer hs a built-in easing/effect. I just did remove the easing from the code. This is the original code, I’m just adding it here as youre backup copy and for reference
jQuery(document).ready(function($) {
var $window = $(window);
var $this = $(this);
var $body = $('body');
var $navbar = $('.x-navbar');
var $topbar = $('.x-topbar');
var $logobar = $('.x-logobar');
var $navbarWrap = $('.x-navbar-fixed-top-active .masthead');
if ( ! $body.hasClass('page-template-template-blank-3-php') && ! $body.hasClass('page-template-template-blank-6-php') && ! $body.hasClass('page-template-template-blank-7-php') && ! $body.hasClass('page-template-template-blank-8-php') ) {
if ( $body.hasClass('x-boxed-layout-active') && $body.hasClass('x-navbar-fixed-top-active') && $body.hasClass('admin-bar') ) {
$window.scroll(function() {
var $adminbarHeight = $('#wpadminbar').outerHeight();
var $menuTop = $navbarWrap.offset().top - $adminbarHeight;
var $current = $(this).scrollTop();
if ($current > $menuTop) {
$navbar.addClass('x-navbar-fixed-top x-container-fluid max width');
$topbar.addClass('x-topbar-fixed-top x-container-fluid max width');
$logobar.addClass('x-logobar-fixed-top x-container-fluid max width');
} else {
$navbar.removeClass('x-navbar-fixed-top x-container-fluid max width');
$topbar.removeClass('x-topbar-fixed-top x-container-fluid max width');
$logobar.removeClass('x-logobar-fixed-top x-container-fluid max width');
}
});
} else if ( $body.hasClass('x-navbar-fixed-top-active') && $body.hasClass('admin-bar') ) {
$window.scroll(function() {
var $adminbarHeight = $('#wpadminbar').outerHeight();
var $menuTop = $navbarWrap.offset().top - $adminbarHeight;
var $current = $(this).scrollTop();
if ($current > $menuTop) {
$navbar.addClass('x-navbar-fixed-top');
$topbar.addClass('x-topbar-fixed-top');
$logobar.addClass('x-logobar-fixed-top');
} else {
$navbar.removeClass('x-navbar-fixed-top');
$topbar.removeClass('x-topbar-fixed-top');
$logobar.removeClass('x-logobar-fixed-top');
}
});
} else if ( $body.hasClass('x-boxed-layout-active') && $body.hasClass('x-navbar-fixed-top-active') ) {
$window.scroll(function() {
var $menuTop = $navbarWrap.offset().top;
var $current = $(this).scrollTop();
if ($current > $menuTop) {
$navbar.addClass('x-navbar-fixed-top x-container-fluid max width');
$topbar.addClass('x-topbar-fixed-top x-container-fluid max width');
$logobar.addClass('x-logobar-fixed-top x-container-fluid max width');
} else {
$navbar.removeClass('x-navbar-fixed-top x-container-fluid max width');
$topbar.removeClass('x-topbar-fixed-top x-container-fluid max width');
$logobar.removeClass('x-logobar-fixed-top x-container-fluid max width');
}
});
} else if ( $body.hasClass('x-navbar-fixed-top-active') ) {
$window.scroll(function() {
var $menuTop = $navbarWrap.offset().top;
var $current = $(this).scrollTop();
if ($current > $menuTop) {
$navbar.addClass('x-navbar-fixed-top');
$topbar.addClass('x-topbar-fixed-top');
$logobar.addClass('x-logobar-fixed-top');
} else {
$navbar.removeClass('x-navbar-fixed-top');
$topbar.removeClass('x-topbar-fixed-top');
$logobar.removeClass('x-logobar-fixed-top');
}
});
}
}
});
(function($){
$(window).on('load', function(){
$('.x-nav-tabs .x-nav-tabs-item').removeClass('active');
$('.x-tab-content .x-tab-pane').removeClass('active');
});
})(jQuery);
jQuery(document).ready(function($) {
var $body = $('body');
var bodyHeight = $body.outerHeight();
var adminbarHeight = $('#wpadminbar').outerHeight();
var navbarFixedTopHeight = $('.x-topbar').outerHeight()+$('.x-navbar').outerHeight();
var locHref = location.href;
var locHashIndex = locHref.indexOf('#');
var locHash = locHref.substr(locHashIndex);
var dragging = false;
$body.on('touchmove', function() {
dragging = true;
} );
$body.on('touchstart', function() {
dragging = false;
} );
//
// Calculate the offset height for various elements and remove it from
// the element's top offset so that fixed elements don't cover it up.
//
function animateOffset( element, ms, easing ) {
$('html, body').animate({
scrollTop: $(element).offset().top - adminbarHeight - navbarFixedTopHeight + 1
}, ms, easing);
}
//
// Page load offset (if necessary).
//
$(window).load(function() {
if ( locHashIndex !== -1 && $(locHash).length ) {
animateOffset(locHash, 1, 'linear');
}
});
//
// Scroll trigger.
//
$('a[href*="#"]').unbind('touchend click').on('touchend click', function(e) {
console.log($('.hm1.x-bar-fixed').outerHeight());
href = $(this).attr('href');
notComments = href.indexOf('#comments') === -1;
if ( href !== '#' && notComments ) {
var theId = href.split('#').pop();
var $el = $('#' + theId);
if ( $el.length > 0 ) {
e.preventDefault();
if (dragging) {
return;
}
animateOffset($el, 850, 'easeInOutExpo');
}
}
});
});
jQuery(document).ready(function($){
$('.x-nav li').each(function(){
$(this).removeClass('current-menu-item');
});
$('.current_page_item').addClass('current-menu-item');
$('.x-nav li').click(function(){
$('.x-nav li').each(function(){
$(this).removeClass('current-menu-item');
});
$(this).addClass('current-menu-item');
});
});
New one
jQuery(document).ready(function($) {
var $window = $(window);
var $this = $(this);
var $body = $('body');
var $navbar = $('.x-navbar');
var $topbar = $('.x-topbar');
var $logobar = $('.x-logobar');
var $navbarWrap = $('.x-navbar-fixed-top-active .masthead');
if ( ! $body.hasClass('page-template-template-blank-3-php') && ! $body.hasClass('page-template-template-blank-6-php') && ! $body.hasClass('page-template-template-blank-7-php') && ! $body.hasClass('page-template-template-blank-8-php') ) {
if ( $body.hasClass('x-boxed-layout-active') && $body.hasClass('x-navbar-fixed-top-active') && $body.hasClass('admin-bar') ) {
$window.scroll(function() {
var $adminbarHeight = $('#wpadminbar').outerHeight();
var $menuTop = $navbarWrap.offset().top - $adminbarHeight;
var $current = $(this).scrollTop();
if ($current > $menuTop) {
$navbar.addClass('x-navbar-fixed-top x-container-fluid max width');
$topbar.addClass('x-topbar-fixed-top x-container-fluid max width');
$logobar.addClass('x-logobar-fixed-top x-container-fluid max width');
} else {
$navbar.removeClass('x-navbar-fixed-top x-container-fluid max width');
$topbar.removeClass('x-topbar-fixed-top x-container-fluid max width');
$logobar.removeClass('x-logobar-fixed-top x-container-fluid max width');
}
});
} else if ( $body.hasClass('x-navbar-fixed-top-active') && $body.hasClass('admin-bar') ) {
$window.scroll(function() {
var $adminbarHeight = $('#wpadminbar').outerHeight();
var $menuTop = $navbarWrap.offset().top - $adminbarHeight;
var $current = $(this).scrollTop();
if ($current > $menuTop) {
$navbar.addClass('x-navbar-fixed-top');
$topbar.addClass('x-topbar-fixed-top');
$logobar.addClass('x-logobar-fixed-top');
} else {
$navbar.removeClass('x-navbar-fixed-top');
$topbar.removeClass('x-topbar-fixed-top');
$logobar.removeClass('x-logobar-fixed-top');
}
});
} else if ( $body.hasClass('x-boxed-layout-active') && $body.hasClass('x-navbar-fixed-top-active') ) {
$window.scroll(function() {
var $menuTop = $navbarWrap.offset().top;
var $current = $(this).scrollTop();
if ($current > $menuTop) {
$navbar.addClass('x-navbar-fixed-top x-container-fluid max width');
$topbar.addClass('x-topbar-fixed-top x-container-fluid max width');
$logobar.addClass('x-logobar-fixed-top x-container-fluid max width');
} else {
$navbar.removeClass('x-navbar-fixed-top x-container-fluid max width');
$topbar.removeClass('x-topbar-fixed-top x-container-fluid max width');
$logobar.removeClass('x-logobar-fixed-top x-container-fluid max width');
}
});
} else if ( $body.hasClass('x-navbar-fixed-top-active') ) {
$window.scroll(function() {
var $menuTop = $navbarWrap.offset().top;
var $current = $(this).scrollTop();
if ($current > $menuTop) {
$navbar.addClass('x-navbar-fixed-top');
$topbar.addClass('x-topbar-fixed-top');
$logobar.addClass('x-logobar-fixed-top');
} else {
$navbar.removeClass('x-navbar-fixed-top');
$topbar.removeClass('x-topbar-fixed-top');
$logobar.removeClass('x-logobar-fixed-top');
}
});
}
}
});
(function($){
$(window).on('load', function(){
$('.x-nav-tabs .x-nav-tabs-item').removeClass('active');
$('.x-tab-content .x-tab-pane').removeClass('active');
});
})(jQuery);
jQuery(document).ready(function($) {
var $body = $('body');
var bodyHeight = $body.outerHeight();
var adminbarHeight = $('#wpadminbar').outerHeight();
var navbarFixedTopHeight = $('.x-topbar').outerHeight()+$('.x-navbar').outerHeight();
var locHref = location.href;
var locHashIndex = locHref.indexOf('#');
var locHash = locHref.substr(locHashIndex);
var dragging = false;
$body.on('touchmove', function() {
dragging = true;
} );
$body.on('touchstart', function() {
dragging = false;
} );
//
// Calculate the offset height for various elements and remove it from
// the element's top offset so that fixed elements don't cover it up.
//
function animateOffset( element, ms ) {
$('html, body').animate({
scrollTop: $(element).offset().top - adminbarHeight - navbarFixedTopHeight + 1
}, ms);
}
//
// Page load offset (if necessary).
//
$(window).load(function() {
if ( locHashIndex !== -1 && $(locHash).length ) {
animateOffset(locHash, 1);
}
});
//
// Scroll trigger.
//
$('a[href*="#"]').unbind('touchend click').on('touchend click', function(e) {
console.log($('.hm1.x-bar-fixed').outerHeight());
href = $(this).attr('href');
notComments = href.indexOf('#comments') === -1;
if ( href !== '#' && notComments ) {
var theId = href.split('#').pop();
var $el = $('#' + theId);
if ( $el.length > 0 ) {
e.preventDefault();
if (dragging) {
return;
}
animateOffset($el, 850);
}
}
});
});
jQuery(document).ready(function($){
$('.x-nav li').each(function(){
$(this).removeClass('current-menu-item');
});
$('.current_page_item').addClass('current-menu-item');
$('.x-nav li').click(function(){
$('.x-nav li').each(function(){
$(this).removeClass('current-menu-item');
});
$(this).addClass('current-menu-item');
});
});
Please note that we don’t do code maintenance, it’s only good for the version it was implemented. But this should serve a reference in case you’ll hire a developer or webmaster that will maintain your site.
Thanks!