i've just changed my Jquery version to 3.1.1 and all of sudden some of my scripts stopped working.
I've already worked out most of them but still cannot resolve the issue with the scroll to anchor script...
Here it is:
$(document).on('click', 'a', function(event){
event.preventDefault();
$('html, body').animate({
scrollTop: $( $.attr(this, 'href') ).offset().top
}, 500);
});
It just won't work now, any idea how to work it out?
Here's the html script part too:
<a class="scrolltomain" href="#content-wrapper">
<span>
<img id="scroller" src="img/scrolldown-1.gif"></img>
<center>Kliknij<br>lub<br>przewiń</center>
</span>
</a>
Would be really grateful if someone could help me.
BTW, chrome console wouldn't show any errors.