Do you think it would be easy enough to add click events to the indicators or arrows to this implementation? To allow for the people that don't have magic mice or touch screens...
Hi, thak You werry much to stih solution. I ask You for help. It perfecty run on separate page Original But if I try to use this solution on my pension page Pension page indicators and prev and next buttons stop work after sirts clicking and do not run until i roll the page. After that it work 1 step and another page rolling is needed. Can You help me? Prese. If I have to send You the source, write me. Thanks.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Do you think it would be easy enough to add click events to the indicators or arrows to this implementation? To allow for the people that don't have magic mice or touch screens...
Yeah, of course! The indicators are easiest: if we know the index of the clicked indicator, we can tell the corresponding item to
scrollIntoView
.For the arrows we could keep track of the current active index:
and scrollIntoView the prev or next one.
But the options of scrollIntoView are not supported by Safari 🙁. So no smooth scrolling.
We can add a polyfill, and it works across modern browsers:
I made a quick demo.
Ohh that is so cool. Thanks so much for the demo I really appreciate it!
Hi, thak You werry much to stih solution. I ask You for help. It perfecty run on separate page Original But if I try to use this solution on my pension page Pension page indicators and prev and next buttons stop work after sirts clicking and do not run until i roll the page. After that it work 1 step and another page rolling is needed. Can You help me? Prese. If I have to send You the source, write me. Thanks.