How to trigger touchstart?
Hello, there is a horizontal slider on someone else's site.
The site itself binds two events mousedown and touchstart, when using the mouse, the values in the data- attributes change on the element. the value is set through the slider from 1 to 100.
Can you please tell me if it is possible to activate this slider programmatically through js to set its value?
That is, programmatically hold down the mouse / touch and pull? No, you can't. Mouse movements cannot be emulated for security reasons, they are readable only.
Why is this needed? If, in order to send this data to the server, you just need to set the required value to some input (presumably), nothing needs to be triggered.Ronan Moses
To place the code, please use CodePen or similar tool. Thanks you!