Eloise-es / Eloise-es.github.io

My portfolio with all projects to this date.
https://www.eloise.es
0 stars 0 forks source link

TV app - Hover effect doesn't work on mobile #17

Closed Eloise-es closed 1 year ago

Eloise-es commented 1 year ago

When on mobile, you have to tap to show the card details. This would be fine but sometimes if you tap directly where the (hidden) anchor tag is, you go straight to the link without ever showing it. I need to use a media query to check for 'hover: hover' and apply different rules depending on this. It looks like I will need to do this in the CSS and change the class only in JavaScript.

Eloise-es commented 1 year ago

Fixed using matchMedia() to check if device is capable of hover. I started in CSS but it turned out JavaScript was more useful for this. If hover not available, you have to click to show the card contents.