开发者

$.scrollTo in IE 8 using class indentifiers and horizontal scrolling

I've looked at the past questions and just can't find exactly what I'm looking for. My code work as intended in firefox but in IE 8 it doesn't. The code in question is:

 $(window).load(function () {
         if ($.getURLParam("gotoTeam") != null) {
             var param1 = '#' + $.getURLParam("got开发者_JS百科oTeam");
             $.scrollTo(param1, 900);

         }

}

In IE it scrolls down to the element, but the horizontal scroll bar goes to the right, pushing the middle content area to the extreme left. The intention is that the scroll should only go down vetically, and there should be no horizontal scrolling.

Any ideas?

Thanks


I got it working in IE 8 by using the code below:

$.scrollTo(param1, {duration: 800, axis: "y"});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜