mit jQuery z.B.
Code:
<script>
$(document).ready(function(){
$('a[href^="#"]').on('click',function (e) {
e.preventDefault();
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing', function () {
window.location.hash = target;
});
});
});
</script>
entsprechend dem Link einen Anker Deiner Wahl anhängen , z.B. #mysection
und am Ziel Element die id mysection vergeben - läuft
Das ist in 5 Minuten umgesetzt - ich setze jetzt voraus, dass die unterschiedl. Methoden des JS Einbindens im Layout bekannt sind.
Lesezeichen