iscroll issue with two dimensional ( horizontal + vertical ) scrolling, scrollable are related issue?

◇◆丶佛笑我妖孽 提交于 2019-12-06 07:18:49

I think the last version (4.1.8) on the github repo will fix your problem ;) I'm using it on some projects and it is now optimized for desktop browser ;)

Edit

From the documentation :

hScroll, used to disable the horizontal scrolling no matter what. By default you can pan both horizontally and vertically, by setting this parameter to false you may prevent horizontal scroll even if contents exceed the wrapper.
vScroll, same as above for vertical scroll.

By default, when creating a new iScroll('idOfElement') the scroll is vertical and horizontal. It can be disabled with these parameters. Dual Scroll is totally possible as this video shows it.

So, to force dual Scroll :

var myScroller = new iScroll('idOfElement', {vScroll:true, hScroll:true});

This is not a complete solution, but this might help you.

First of all, The HTML code was not properly nested, and so you were needed to put the <div> inside the <b>. I fixed up the HTML a bit and its working without the <b>

http://jsfiddle.net/Aexhz/

And with properly nested HTML and correct settings, This worked even after dividing the HTML/JS/CSS

For me, it does show some Horizontal as well as Vertical Scrolling, but i don't know if that's how you want it to be. i Edited the Class initialization line as well

    myScroll = new iScroll('scroller1', {desktopCompatibility:true});

TO

myScroll = new iScroll('scroller1', {
    snap: true,
    momentum: false,
    hScrollbar: false,
    vScrollbar: false,
    desktopCompatibility: true
});

This doesn't affects much but i still put that.

I will continue looking into this and update my answer if i find anything new.

I know you want to fix this using iscorll but wanted to share this with you, i had great results using it: http://jscrollpane.kelvinluck.com/#usage

It is highly customizable with css, a demo here with vertical and horizontal scroll: http://jscrollpane.kelvinluck.com/basic.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!