Reputation: 883
I am using jQuery dialog widget. The html rendered for that dialog is shown below in the jsFiddle. Scroll bars can be seen in the outer div but the scroll event is not firing.
Adding below javascript does not fire the event:
$("#dialog).scroll(function(){
alert("scroll");
});
$("#dialog").on('scroll',function(){
alert("scroll 1");
});
Upvotes: 0
Views: 1504
Reputation: 3838
Check my update here:
http://jsfiddle.net/JeekOnline/dM5kY/21/
$( document ).ready(function() {
$("#dialog").scroll(function(){
alert("scroll");
});
});
Upvotes: 1
Reputation: 2967
There are several error:
demo here: http://jsfiddle.net/dM5kY/19/
$( document ).ready(function() {
$("#dialog").on('scroll', function(){
alert("scroll 1");
});
});
Upvotes: 2
Reputation: 1059
You did not added jquery library. here is the updated jquery code:
$(function(){
$('#dialog').scroll(function(){
alert("scroll");
});
})
Updated fiddle http://jsfiddle.net/dM5kY/18/
Upvotes: 2