0

他们的文档(http://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojListView.html)没有列出任何“滚动”事件。

我如何捕获“滚动”事件,因为 Oracle-Jet 本身不支持它。在父“div”上捕获它是个好主意吗?

4

1 回答 1

1

使用 jQuery,例如通过

$("#myList").scroll(function(){console.log("This is scroll");})

使用以下 HTML(相关的事情是侦听器应附加到由 rootAttributes 中传递的 id 属性标识的元素(ID 未设置为 UL 本身,而是 UL 的父元素

<ul data-id="c-list" data-bind="ojComponent: {component: 'ojListView', 
                            data: dataSource, 
                            selectionMode: 'none', 
                            rootAttributes: {id: 'myList'} }">
</ul>
于 2016-09-29T15:06:00.743 回答