Might be a duplicate but I cant seem to find the right answer.
I have a button, and when I press it, I want it to scroll to the li item that has an ID of '#li-1', and also have it hovered. I know my code is wrong but not really sure how to fix it (new to jquery). So how do I achieve the desired results?
Here's a jsfiddle link - https://jsfiddle.net/orb1vw28/7/
Thanks in advance
$(document).ready(function(){
$('.button').click(function(){
$('body').scrollTo('#li-1', 200);
$("#li-1").toggleClass("hov");
});
})