Files
Vocaluxe/js/smooth-scroll.js
T
Hendrik Blöß d7517b170a Added gallery section
- added gallery section
- removed hero_area_small.html
2017-07-14 17:37:56 +02:00

15 lines
498 B
JavaScript

$(function() {
$('a[href*=#]:not([href=#]):not(.control-button)').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;
}
}
});
});