chjtx / JRoll

Smooth scrolling for the mobile web
http://www.chjtx.com/JRoll/
MIT License
460 stars 91 forks source link

Cannot read property 'children' of null #33

Closed hyy1115 closed 7 years ago

hyy1115 commented 7 years ago

JRoll报错代码:

me.scroller = options && options.scroller ? (typeof options.scroller === 'string' ? document.querySelector(options.scroller) : options.scroller) : me.wrapper.children[0]

me.wrapper.children[0]找不到。

我的HTML结构:

<div id="wrapper" style={{height: "100vh"}}>
        <ul id="scroller">

        </ul>
</div>
hyy1115 commented 7 years ago

ok,最终我自己解决了。ㄟ( ▔, ▔ )ㄏ