jscrollpane 未在 IE 中重新初始化
我正在使用很棒的滚动条替换插件 - jScrollpane
我有一个表,我通过它附加行当用户滚动到底部时向服务器发出的 json 请求。
每次我提出此请求时,完成后我都会通过标准方法重新初始化滚动窗格,如下所示: -
var myLayout;
//initialize sidebar
myLayout = $("#MySplitter").layout({
defaults: {
size: "50%",
onresize: function () {
var api = $('#toppane-wrapper').data('jsp');
api.reinitialise();
}
},
center: {
size: "0px",
onresize: function () {
var api = $('#toppane-wrapper').data('jsp');
api.reinitialise();
}
},
south: {
size: "50%",
onresize: function () {
var api = $('#bottompane-wrapper').data('jsp');
api.reinitialise();
}
}
});
因此,本质上,当面板因内容增加而调整大小时,滚动窗格应重新初始化并检测新的高度,相应地调整滚动条。
除了 IE 9 之外,这在我测试过的每个浏览器中都完美运行。
我完全不知道为什么会这样。有人可以帮忙吗?
I am using the fantastic scrollbar replacement plugin - jScrollpane
I have a table which I append rows to via a json request that gets made to the server when the user scrolls to the bottom.
Everytime I make this request, upon completion I reinitialize the scrollpane via the starndard method as shown below:-
var myLayout;
//initialize sidebar
myLayout = $("#MySplitter").layout({
defaults: {
size: "50%",
onresize: function () {
var api = $('#toppane-wrapper').data('jsp');
api.reinitialise();
}
},
center: {
size: "0px",
onresize: function () {
var api = $('#toppane-wrapper').data('jsp');
api.reinitialise();
}
},
south: {
size: "50%",
onresize: function () {
var api = $('#bottompane-wrapper').data('jsp');
api.reinitialise();
}
}
});
So essentially when the panel resizes due to the increased content, the scrollpane should reinitialize and detect the new height, adjusting the scrollbar accordingly.
This works perfectly in every browser I have tested on apart from IE 9.
I'm at aa complete loss as to why this might be. Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
愚蠢的是,我在 CSS 之外的其他地方寻找这个问题的根源。
事实证明,为了使窗格在 IE 中动态调整大小,必须将其设置为“overflow:hidden”。奇怪的是,这在任何其他浏览器中都是不必要的。
Foolishly I was looking everywhere else other than CSS for the source of this problem.
It turns out in order for the pane to resize dynamically in IE, it must be set to overflow:hidden. Curiously this is not necessary in any other browser.