我使用jquery nicescroll (http://areaaperta.com/nicescroll/)在5月的网页,使用ajax标签jquery。
我有一个调用要加载的news.html的main.php页面。
main.php
<nav>
<ul>
...
<li><a href="news.html">News</a></li>
...
</nav>
<section id="cont1">
...
</section>
<section id="cont2" style="display:none">
</section>ajax-load.js
$(document).ready(function() {
$("ul li a").click(function() {
;
$("section#cont2").fadeIn(200).siblings().hide();
$("ul li a").removeClass('current');
$(this).addClass('current');
$.ajax({ url: this.href, success: function(html) {
$("section#cont2").empty().append(html);
}
});
return false;
});news.html css
#content-scroll{
height:500px;
overflow-y: scroll;
}这是我的news.html
<script type="text/javascript" src="assets/js/jquery.nicescroll.js"></script>
<script>
$(document).ready(function() {
$("#content-scroll").niceScroll({cursorcolor:"#000",background:"#ccc",autohidemode:false});
});
</script>
<div id="content-scroll">
.... long text ....
</div>我现在的问题是,在直播中,当我调用news.html时,默认滚动将首先显示在jquery nicescroll上,然后再显示。
演示没有显示默认的滚动,我认为这是因为ajax选项卡式jquery。
有没有办法不显示默认滚动,而是快速加载jquery nicescroll?
发布于 2013-02-08 11:16:37
如果您在jQuery调用后加载默认滚动条,它会起作用吗?
https://stackoverflow.com/questions/14765109
复制相似问题