-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
instead of drag event a hoover event #7
Comments
Hey @MarzV, Replacing the mousedown and mouseup events with mouseover and mouseout events kinda work, but it needs to be optimised a bit. More specifically, the drag button slides back a bit when you're moving the mouse around and it stops the slider when it stops hovering over the drag element because of that sliding distance. I think you can circumvent this by binding the mouseout events to the container instead of the drag element. Hope this helps. Also, please note that I have no idea how this would work on mobile, so proceed with caution on that front. Thanks for the browserstack offer, I'll let you know if sth comes up 👍 |
Tnkz tatarjr fof swift reply and your directions. |
Tatarjr, I struggle with this part of your advice: I think you can circumvent this by binding the mouseout events to the container instead of the drag element. Please could you be more specific.?. Code example much appreciated.. |
Hey @MarzV, look at lines 48 & 53 in the main js file. Those mouseup events are bound to the dragElement, you need to alter the script so that those events are bound to the container element. There's a non-plugin version on Codepen, you may find it easier to fork that and play around with it. |
Hey, your before-after is great, its light weight! end easy the use. Can you give some advise how to make the drag event a hoover event. So I can compare the images just by hovering over the images?.
Your help would be much appreciated and I good do some device testing for you with my browserstack account, just name the devices that you woud like to test your slider on.
The text was updated successfully, but these errors were encountered: