Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS ‘Second click’ Re: ‘Second click’

#104054
Senff
Participant

The trick is to keep the link (on the image) hidden until you hover it. On iPad, it will then only appear when you actually tap it (which simulates a hover). There is no “unhover” state on iPad, so the link will stay there and you can click it.

Here’s how it works for one image: http://jsfiddle.net/senff/A64QU/6/

I’ve made the link BLACK so you can see when it’s actually there.

On desktop, the black link appears when you hover (and you can click it right away).
On iPad, the black link appears when you do the iPad equivalent of hover (tapping it), and then the next tap will be an actual click.

On iPad, the black link should only disappear when you hover on any other image. Tried that but couldn’t make it work this quickly so I’ll look into that later if no one else does. Works on desktop but not on iPad: http://jsfiddle.net/senff/A64QU/7/