Javascript NiceSoll在页面滚动完成后激活滚动
我有一个aspx页面。在该页面中,我应用了nicescroll以使div垂直滚动。但只有在索尼爱立信移动安卓4.2版中完成页面的本机滚动后,nicescroll才会滚动div。我想先滚动div,然后滚动页面 这是我在aspx页面中的div标签Javascript NiceSoll在页面滚动完成后激活滚动,javascript,jquery,css,scrollbar,Javascript,Jquery,Css,Scrollbar,我有一个aspx页面。在该页面中,我应用了nicescroll以使div垂直滚动。但只有在索尼爱立信移动安卓4.2版中完成页面的本机滚动后,nicescroll才会滚动div。我想先滚动div,然后滚动页面 这是我在aspx页面中的div标签 <div id="divexample"> <div class="row-fluid white-b
<div id="divexample">
<div class="row-fluid white-bg">
<div class="row-fluid"><b>
<asp:Label ID="lblcode" runat="server" Text="Using this card?" CssClass="modalLabel"></asp:Label></b>
</div>
<div class="row-fluid">
<asp:Label ID="lblcode2" runat="server" Text="Here are the instructions" CssClass="modalText modalLabeltext"></asp:Label>
</div>
<div class="row-fluid center">
<asp:Image ID="Image5" runat="server" ImageUrl="card.gif" />
</div>
</div>
</div>
head标签中的调用部分是
<script type="text/javascript">
$(document).ready(
function () {
$("#divexample").niceScroll({ nativeparentscrolling: "false", touchbehavior: "true" });
}
);
</script>
$(文件)。准备好了吗(
函数(){
$(“#divexample”).nicesroll({nativeparentscrolling:“false”,touchbehavior:“true”});
}
);
我的css是
<style type="text/css">
#divexample
{
overflow:auto;
height: 300px;
}
</style>
#除名
{
溢出:自动;
高度:300px;
}
请帮我解决这个问题。我为这个问题挣扎了两个漫长的星期。我找到了几种替代方法来解决这个问题,但我没有解决这个问题。如果有人修复了is,那就太好了。请尝试以下代码:
$("#divexample").bind("mousedown,touchstart",function (e) {
e.stopPropagation();
});
很抱歉延迟回复。从那时起,我在另一个项目中工作,我没有尝试过这个。今天我尝试了上述代码。但我没有得到滚动条。以前我至少有滚动条,但现在我没有滚动条。首先,我放置了您给出的唯一代码。但是没有工作。然后我放置了
$(“#divexample”).nicesroll({nativeparentscrolling:“false”,touchbehavior:“true”})$(#divexample”).bind(“mousedown,touchstart”,函数(e){e.stopPropagation();})代码>现在我也没有让它工作。对吗?请帮我克服这一点。谢谢