Single Click Navigation and Swipe Animation for Custom Slider

code link : https://codepen.io/deepk2891/pen/wvLdZqR

Hi everyone,

I’ve created a custom slider using JavaScript for my website and I’m looking to address a couple of issues:

Single Click Navigation: Currently, the “Next” and “Previous” buttons in my slider only work on double-click. I want them to work on a single click. I’ve shared the code on CodePen for reference. Any suggestions on how to fix this issue?

Slider Animation: I’d like to add a swipe animation to my slider, similar to what you see in Swiper or Slick Slider. Specifically, I want the ability to click and hold the element, then slide to reveal more items. Could anyone help me implement this type of functionality?

Thanks in advance for your help!
Was this page helpful?