Alert is hit 2 times sometimes more.
- function WireScrollForMorePatients() {
$('#CalendarId').unbind('scroll');
$('#CalendarId').bind('scroll', function () {
var elem = $('#CalendarId');
- if (elem.scrollLeft() + elem.innerWidth() >= elem[0].scrollWidth - 1) {
alert('End reached') // This is hit more than once in IE and Chrome and FireBox ask to stop popping the same alert !
return false;
}
});
}
Also there's a different behavior if I scroll with the cursor of the scrolled or if I hit the right button. If I use the button, it pops #1 time but if I scroll by holding the cursor of the scrolled and scroll to the end it pops multiple time. Weird no ?