2

我想在 ajax 创建的页面上使用 slimscroll 插件。所以我需要将它与 jquery live() 或 on() 函数一起使用。我应该如何使用它?

4

1 回答 1

0

我对 slimscroll 也有同样的问题。我无法解决它,所以我又去了谷歌。找到了这个:https ://github.com/LearnBoost/antiscroll 。

它声称使用本机浏览器控件,因此它应该比大多数滚动条扩展更好。

希望这对你有帮助!

编辑:哦,不要忘记$('.antiscroll-wrap').antiscroll();在编辑页面内容后调用。

提示:对于那些使用$.clone()并发现自己有多个(非功能性)滚动条的人,使用它来删除它们:

var antiscrollWrap = $clone.children(".antiscroll-wrap").first();
var antiscrollInner = $(antiscrollWrap).children(".antiscroll-inner").first();
$(antiscrollWrap).html(antiscrollInner);
于 2013-10-13T15:18:38.080 回答