support for touch devices

Now works on ios devices.