E.g:
.container{width:300px; height:300px; overflow:scroll;}
<div class="container">
with long contents which make the container scroll....
</div>
当我trigger
events
click and scroll
时,我希望scrollbar
container
。
因为我有events binded
容器。所以,我不希望scrollbar's event
绑定到container
itselft。
非常感谢!!
答案 0 :(得分:1)
您可以通过jQuery绑定多个事件,如下所示:
$('.container').bind('click scroll', function() {
alert('scroll or click occurred')
});