I'm trying to boost my online store's performance by using SmoothState.js. It work's very well, until I come to the part in the tutorial where I'm working on the functions.js file.
What happens when the function.js file is added, is that some links get unclickable... For example when you click 'skin care' and the nav opens, you can't click any of the links. You can't click the links in the footer either. The file includes the following:
// Contents of functions.js
;(function($) {
'use strict';
var $body = $('html, body'),
content = $('#main').smoothState({
// Runs when a link has been activated
onStart: {
duration: 250, // Duration of our animation
render: function (url, $container) {
// toggleAnimationClass() is a public method
// for restarting css animations with a class
content.toggleAnimationClass('is-exiting');
// Scroll user to the top
$body.animate({
scrollTop: 0
});
}
}
}).data('smoothState');
//.data('smoothState') makes public methods available
})(jQuery);
Demo here. Password: pruget