function iScrollLoaded()
{
//(function($){
myScroll = new iScroll('wrapper',
{
hideScrollbar:true,
hScroll:false,
bounce:true,
lockDirection:true,
});
//})(jQuery)
}
document.addEventListener('DOMContentLoaded', iScrollLoaded, false);
据我了解,如果从 iScroll 页面这应该阻止屏幕向左/向右拖动,但是.. 似乎它没有任何效果,无论如何要防止滚动包装器向左/向右拖动还是我做错了这里?
使用中的 HTML 的基本示例..
<div id="page">
<div id="header" class="clearfix">
<div class="header_logo">
<a href="domain.com/" title="domains">
<img src="/logo_600.png" style="border:none;" alt="">
</a>
</div>
</div><!-- /header -->
<!-- sub_nav -->
<!-- /sub_nav -->
<div id="wrapper" class="no_snav">
<div id="scroller" class="overthrow">
<div>This profile is currently unavailable or does not exist.</div>
<div id="geolocation_latlng" style="visibility:hidden;"></div>
</div><!-- /scroller -->
</div><!-- /wrapper -->
</div><!-- /page -->