问题
I'm having a problem with the jquery localscroll plugin, it seems to work fine on all browsers except IE8.
In IE8 it scroll down and works apart from it doesn't scroll to the right id.
$(document).ready(function(){
$('#nav').localScroll({ duration: 2000, easing: "swing"});
//.parallax(xPosition, speedFactor, outerHeight) options:
//xPosition - Horizontal position of the element
//inertia - speed to move relative to vertical scroll. Example: 0.1 is one tenth the speed of scrolling, 2 is twice the speed of scrolling
//outerHeight (true/false) - Whether or not jQuery should use it's outerHeight option to determine when a section is in the viewport
$('.parallax__one').parallax("50%", 0.3);
$('.parallax__two').parallax("50%", 0.4);
$('.slideleft').parallax("50%", 0.4);
$('.parallax__four').parallax("50%", 0.3);
$('.parallax__five').parallax("50%", 0.6);
$('.return8').parallax("65%", 2);
});
<header class="header">
<div class="container">
<ul class="menu" id="nav">
<p class="ir header__logo"><span><a href="#one" class="js-action" date-action="one">Logo</a></span></p>
<li class="menu__list"><a href="#two" class="js-action" date-action="two">01<b>about</b></a></li>
<li class="menu__list"><a href="#three" class="js-action" date-action="three">02<b>the product</b></a></li>
<li class="menu__list"><a href="#four" class="js-action" date-action="four">03<b>the future</b></a></li>
<li class="menu__list"><a href="#five" class="js-action" date-action="five">04<b>contact</b></a></li>
</ul>
</div>
来源:https://stackoverflow.com/questions/14320173/jquery-localscroll-ie8