I have these 3 functions and I think the smooth scroll ones are overwriting the image blur function or something but I don't know what the issue is. If I comment out the smooth scroll functions the image background blur function works.
Below are the jQuery functions, does anyone have any solutions?
//////////////////////// Smooth Scroll To Specific Element On Page ////////////////////////
$(document).ready(function($) {
$('a[href^="#"]').not('.nav-link').bind('click.smoothscroll', function(e) {
e.preventDefault();
var hash = this.hash;
jQuery('html, body').animate({
scrollTop: jQuery(hash).offset().top - 60
}, 1500, function(){});
});
});
//////////////////////// Smooth Scroll To Specific Element On Different Page ////////////////////////
$(document).ready(function(){
var urlHash = window.location.href.split("#")[1];
if (urlHash.length > 0)
$('html,body').animate({
scrollTop: $('#' + urlHash).offset().top - 60
}, 2500);
});
//////////////////////// Background Image Blur ////////////////////////
$(document).ready(function() {
$(window).scroll(function(e) {
var s = $(window).scrollTop(),
opacityVal = (s / 1000);
$('.blurred-image').css('opacity', opacityVal);
});
});