[英]onsen ui scroll event is not firing
Is it possible to get the scroll event fired with onsen ? 是否可以通过onsen触发滚动事件? I tried to remove the onsen css file and it worked, the scroll event was fired.
我试图删除温泉css文件,并且它起作用了,滚动事件被触发了。 But that's no solution -.-
但这不是解决方案-.-
I also tried the ons-scroller tag but this didn't work too. 我也尝试了ons-scroller标记,但这也没有用。
Can anyone help me to get the scroll event fired with onsen ui ? 谁能帮助我让onsen ui触发滚动事件?
Just adding an eventListener to an element should work, here is an example: 只需将eventListener添加到元素即可,这是一个示例:
<script type="text/javascript"> document.getElementById('container').onscroll = function() { console.log("scrolling"); }; </script>
or 要么
<script type="text/javascript"> document.getElementById('container').addEventListener("scroll", function() { console.log("scrolling"); }); </script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.