Hi there, I have a bunch of text links in a text block, in a row at the top of my page.
For each text link I have clicked 'link' and then entered an ID which corresponds to an ID I have given each row below in the gridder.
Works like a dream to navigate apart from on one or two pages where if after clicking and navigating to a row with the aref link, when you scroll back up to the top of the page it cuts off some of the very first row at the top UNLESS you scroll all the way to the bottom of the page and then back to the top. After that it works all the time, weird. Any thoughts?
Also I wanted to smooth scroll all my anchor points. If ound another thread on here and armin had written this jQuery for someone:
jQuery(document).ready(function(){
jQuery('body').on('click', '.js-scrollTo', function(event) {
event.preventDefault();
var id = jQuery(this).attr('href');
jQuery('html, body').animate( { scrollTop: jQuery(id).offset().top }, 750 );
});
})
It doesnt really work for me, even if I try replacing the class with my ID. Ideally id like a bit of jQuery that animates all anchor point links. I can easily enter all the IDs if I have to though.
Do you have any ideas on this?
Thanks!
Duncan