on mouse scroll js code example
Example 1: jquery on wheel event
$("#main-div" ).on( 'wheel', function() {
alert("Hello! I am an alert box!!");
});
Example 2: javascript detect scroll wheel
element.onscroll = function() {
// Code here
}
$("#main-div" ).on( 'wheel', function() {
alert("Hello! I am an alert box!!");
});
element.onscroll = function() {
// Code here
}