I am trying to make the smooth scroll effects with this basic script for this site: http://greaca9.ro/test/index.html
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
The problem is that it doesn't fire up when I click a link ('APASA' right under the video background) to scroll me lower on the page. I found out that the issue comes out from this part of the style.css:
.box {
position: absolute;
bottom: 0;
left: 0;
right: 0;
top: 0;
background-color:#444444;
}
How can I make it work or change it to a workaround!?