(This page includes affiliate links. If you click and purchase, I receive a small commission at no extra cost from you and that way you can support me. I only recommend tools that I have personally used and loved.)
Tutorial Video:
Introduction – Switch Image with your cursor movement – Image scrubber
In this tutorial, we will create image that switches as we move our cursor in X direction on hover.
Image Scrubber Code
- dm-scrubber is the CSS class of the container/div that has all images and arrow icons.
- dm-scrubber-img is the CSS class of the images.
- dm-scrubber-left-arrow and dm-scrubber-right-arrow are CSS classes of the elements that can be used to switch the images with click. Useful for touch devices, so make it visible only for mobile/tablet.
