So I have a JavaScript function that scrolls to the desired element when that part of the navigation bar is clicked. It works fine in Chrome and Edge, but not Firefox or IE.
The function:
$('html', 'body').animate({
scrollTop:$('.'+nextView).offset().top}, 1500
);
nextView
is a variable from another function where it determines which part of the nav was clicked. Basically, it contains the name of the div to be scrolled into view.
Anyone know why it doesn't work? Or an alternative method of auto scrolling that will work?