开发者

how to get slick grid to work with iscroll

I am trying to get iscroll to work with slick grid so that the grid div can scroll on an iPhone / iPad. I tried by adding scroll on the div element i.e.: myScroll = new iScroll('myGrid'); And that doesn't work.

According to the example, iscroll expects the div to be similar to:

<div id="myGrid">
<ul id="thelist">
<li>row 1</li>
<li>row 2</li>
<li>row 3</li>
</ul>
</d开发者_StackOverflowiv>

any thoughts?

Thanks.


Following checklist might help

  1. check for 'oops' mistakes first. Did you include the iscroll.js? Is var myScroll really a global variable instead of a local?
  2. Make sure any CSS on the 'theList' or 'myGrid' element does not block iScroll. Consider disabling CSS on those elements for testing.
  3. Keep in mind that iScroll scrolls only the first child element below the wrapper 'myGrid'. So if you have more children below 'myGrid' you might not get what you expect.
  4. Many developers use a DIV as the child below the wrapper and in that DIV place a list element UL. Your code should work, I tested it, but you might want to consider an extra DIV.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜