开发者

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

开发者 https://www.devze.com 2023-04-13 05:50 出处:网络
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:

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

精彩评论

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

关注公众号