I am making this horizontal slider page and trying to have links up top that direct the pages to certain section IDs that take up the page.
So About
Would go left or right to the section with id #about
I have this old jquery that works well on a vertical page to scroll the page up and down but not sure how to tweak it left and right to go to a certain section ID. Ideas?
$('a[href^="#"]').on('click', function(event) {
var target = $(this.getAttribute('href'));
if( target.length ) {
event.preventDefault();
$('html, body').stop().animate({
scrollTop: target.offset().top
}, 1000);
}
});