自定义滚动条与Facebook的评论 [英] Custom Scrollbar with Facebook comments
问题描述
目标
我想在 Facebook注释容器中加载窗口时运行滚动条。
问题
滚动条运行良好,但我必须调整屏幕以强制其调用。
场景
我做了 jsFiddle的一个例子(看看!),说明当前的情况。
有两层:
-
.comments
- 工作,但您需要调整窗口大小; -
.example
- 无缝工作。 >
所以我问:有人知道一些技巧来解决我的问题?提前感谢!
您需要打开updateOnContentResize,因为它是在滚动条初始化后加载的iframe。
{pre>
$(。comments)。mCustomScrollbar({
theme:dark,
advanced:{
updateOnContentResize:true
}
});
这是编辑的小提琴 http://jsfiddle.net/vDUyU/1/
The goal
I want to run a scrollbar when a window load within a Facebook comments' container.
The problem
The scrollbar works well, but I have to resize the screen to force its invocation.
The scenario
I made an example on jsFiddle (take a look!) illustrating the current scenario.
There are two layers:
.comments
— works but you need to resize the window;.example
— works seamlessly.
So I ask: someone knows some trick to resolve my problem? Thanks in advance!
You need to turn on updateOnContentResize because it is an iframe that gets loaded after the scrollbar has initialised.
$(".comments").mCustomScrollbar({
theme: "dark",
advanced:{
updateOnContentResize: true
}
});
Here is the edited fiddle http://jsfiddle.net/vDUyU/1/
这篇关于自定义滚动条与Facebook的评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!