How do I create a jquery-powered vertical scroll of div contents on hover, not on click?
Check out this example. Try hovering the rightbar under the flags. It will start scrolling the content the way your mouse hovers.
I’m not sure how to do this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
We can’t exactly just give you the answer to this, but as a hint you would have to use the
mousemoveevent and detect where, within the panel, the mouse is. Setoverflow: hidden;and move a relative speed to how close the mouse is to the edge. I’d recommend using two divs – one outer div to set the boundaries (detect mousemove on this div) and then the other one absolutely positioned.It would be something like this:
HTML:
CSS:
jQuery: