Hi, is it possible to make a link to a section with an id and the effect like the "scroll to top" button?
Thanks!
Nicolas
Link to a section with scroll to top button effect
Hi, is it possible to make a link to a section with an id and the effect like the "scroll to top" button?
Thanks!
Nicolas
Hi @Nicolas
does this answer your question?
http://laythemeforum.com:4567/topic/2863/link-to-anchor-from-another-page/4
Best!
Marius
Hi @mariusjopen
I think it's the idea, but i want to do that in the same page :
1- i put an image and i make an id (like hello)
2-i have a text link in this page (at the top for exemple) and in the link url i write this : http://mysite/#hello
3-when i click on this text link i want to go to the image with smooth scroll effet :)
It is possible? Here is my website with the menu with links which refers to the images (but not with smooth effect): http://druidhigh-visuals.com
Thanks!
Dear @Nicolas
have a look here:
http://jsfiddle.net/kevinPHPkevin/8tLdq/1/
And consider this:
http://laytheme.com/documentation.html#custom-javascript
It won't be that difficult :-)
Best!
Marius
Hi @mariusjopen
It's works! :D Thank you very much.
Here's how I did it with the help of your links:
window.laytheme.on("newpageshown", function(layoutObj, type, obj){
jQuery("#button").click(function() {
jQuery('html, body').animate({
scrollTop: jQuery("#myid").offset().top
}, 2000);
});
});
for now this code works on a single id and link. I will try to adapt it to do this on several different links and ids.