jQuery niceScroll Not Working Along w/ .load()
jQuery niceScroll Not Working Along w/ .load()
我正在div中实现jQuery插件。它工作得很好,除了当我向使用niceSoll的标签添加.load()函数时,没有滚动功能。但是,如果我删除了niceSoll,那么原生滚动程序就可以正常工作。。。?
这是针对一个webKit浏览器。有什么想法吗?还是我的代码太傻了?
$(document).ready(
function(e) {
$("#west").load('http://mySite.comregulatory_list.php', '', function(response, status, xhr) {
if (status == 'error') {
var msg = "Sorry but there was an error: ";
$(".content").html(msg + xhr.status + " " + xhr.statusText);
}
});
$("#west").niceScroll({
cursorcolor : "#6699FF",
cursorwidth : "2px",
grabcursorenabled : "false",
preservenativescrolling : "false",
cursorborder : "0px",
scrollspeed : "20",
});
})
niceScroll
插件几乎肯定会更新#west
元素的HTML结构,因此您应该针对#west
元素中的特定内容容器,或者在加载新内容时重新初始化niceScroll
插件:
$("#west").load('http://mySite.comregulatory_list.php', '', function(response, status, xhr) {
if (status == 'error') {
var msg = "Sorry but there was an error: ";
$(".content").html(msg + xhr.status + " " + xhr.statusText);
} else {
$(this).niceScroll({
cursorcolor : "#6699FF",
cursorwidth : "2px",
grabcursorenabled : "false",
preservenativescrolling : "false",
cursorborder : "0px",
scrollspeed : "20",
});
}
});
相关文章:
- 正在寻找比$(document).ready慢的$(window).load的替代方案
- jQuery点击ON现在使用.load触发关闭
- .load()函数赢得't加载javascript
- 使用jquery.load('pageName')方法时,未从应用程序缓存加载Html页
- 使用.load()后在Lightbox中插入谷歌地图
- .load ajax无法正常工作whitin wordpress主题
- 在Debian中运行包含load()和print()函数的JS脚本
- jQuery css可见性在load方法中不起作用
- Mediawiki皮肤创建-Javascript don'Don’t get load
- paper.js animation along a path
- $(window).load在带有异步js-libs的IE中触发得太快
- 动态潜水高度jQuery.Load()不工作
- jQuery .load with variable as url
- google.maps.event.addDomListener(window, 'load', fun
- Selectboxit Load Time
- jQuery.load()是另一个包含prism.js的页面
- $(window).load()被调用了无数次
- Turbolinks等效于window.load的事件
- Three.js issue creating meshes outside of loader's load(
- jQuery niceScroll Not Working Along w/ .load()