Hello everyone, I am relatively new to JS and currently working on creating a vertical image scroller. I have successfully implemented code to scroll from left to right on LI elements until the center of that LI is reached. However, I now want to apply this functionality to a vertical scroller with 6 divs set up. When a thumb is clicked, I would like the LI's to be scrolled to that specific position. Below is the code I have used for horizontal scrolling:
$('html, body').animate({
scrollLeft: ((thisImg.offset().left)-windowWidth+imagewidth)}, 1300);});
I attempted using scrollToTop but it did not work as expected. If anyone could provide guidance on how to fix this issue, I would greatly appreciate it. Additionally, I am looking to make the crimson list items capture 100% width and height. Any suggestions on how to achieve this would be helpful.
Thank you in advance. PS: I am aiming to achieve a similar effect as seen on this Demo Site