Hi there,
I added three anchor links to my main menu like https://paulstolle.com/start#projekte
The first link is working smooth but the other two links are just jumping to the bottom of the page without a smooth transition.
I tried different workarounds and ended up with the following code in my Custom <head> content :
<script>
window.laytheme.on('newpageshown', function(){
if(window.location.hash.length > 0){
var id = window.location.hash;
if(jQuery(id).length > 0){
jQuery('html, body').animate(
{ scrollTop: jQuery(id).offset().top },
{ duration: 1200 });
}
}
});
</script>
Is there a solution that all links are directing to the locations where I set my id's?
Thanks in advance!
Paul