Make slider work on touch devices

Makes slider work on touch devices.