IE 8中的$ .scrollTo使用类标识符和水平滚动

时间:2011-10-13 11:12:51

标签: jquery class internet-explorer-8

我看过去的问题,但是找不到我正在寻找的东西。 我的代码在firefox中按预期工作,但在IE 8中却没有。有问题的代码是:

 $(window).load(function () {
         if ($.getURLParam("gotoTeam") != null) {
             var param1 = '#' + $.getURLParam("gotoTeam");
             $.scrollTo(param1, 900);

         }

}

在IE中,它向下滚动到元素,但水平滚动条向右移动,将中间内容区域推到最左侧。目的是滚动应该只是向下滚动,并且不应该有水平滚动。

有什么想法吗?

由于

1 个答案:

答案 0 :(得分:0)

我使用下面的代码在IE 8中使用它:

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