I've been working on this site: http://buchstudio.com/projects/spis.html
The red hand icon on right works fine in every browser except Firefox and I can't figure out why?
Here the code:
<body id="gototop">
<nav>
<p><a href="../about.html" class="nav_about p_about">About</a></p>
<a href="../buchstudio.html" class="nav_logo"><h5>B</h5></a>
<a href="#gototop"><img class="nav_gototop" src="../img/gototop.png" alt="Go to top"></a>
</nav>
$(document).ready(function() {
$('a[href^="#"]').on('click',function (e) {
e.preventDefault();
console.log("Denne funktion fanger #");
console.log(event);
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 800, 'swing', function () {
window.location.hash = target;
});
});
});
Thanks!
(I'm testing in OSX)