Reputation: 36947
function iScrollLoaded()
{
//(function($){
myScroll = new iScroll('wrapper',
{
hideScrollbar:true,
hScroll:false,
bounce:true,
lockDirection:true,
});
//})(jQuery)
}
document.addEventListener('DOMContentLoaded', iScrollLoaded, false);
As I understand if from the iScroll page this should stop the screen from being able to be dragged left/right but.. seems it holds no effect, is there anyway to keep the scroll wrapper from dragging left/right or am I doing it wrong here?
basic example of the HTML in use..
<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 -->
Upvotes: 0
Views: 2845
Reputation: 623
This is your code block. Here you specify hScroll:false
. It means disable the horizontal scroll. Make it hScroll:true
and check it.
Your code
function iScrollLoaded()
{
//(function($){
myScroll = new iScroll('wrapper',
{
hideScrollbar:true,
hScroll:false, /* THIS SHOULD BE TRUE FOR HORIZONTAL SCROLLING */
bounce:true,
lockDirection:true,
});
//})(jQuery)
}
document.addEventListener('DOMContentLoaded', iScrollLoaded, false);
Upvotes: 1