Click here to Skip to main content
16,018,797 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am currently trying to build my own slider, but I would like to know how to prevent the page from scrolling when am over a particular div.

I tried using the codes below :

JavaScript
$(document).ready(function () {
   $("#tracks").mouseenter(function (e) {
     e.preventDefault();
     e.stopPropagation();
     onNavigate();
    });
  });


The onNavigate() method is supposed to move the scroll bar up and down, but the default operation of the mouse is preventing me the code from performing the operation. Thanks for usual help.
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900