And this is similar to what I was speaking of when looking at Image Handler's image hover feature.. The image hover feature is admin configurable (on/off), but that doesn't mean it should be applied to all devices, in particular touchscreen devices. I've experimented with media queries. At first, this looked like the solution.. The issue I discovered in testing was that the media queries did not behave fully as I would like on some desktop devices. The media queries disabled the image hover on my 10" laptop, but not on my 10" tablet. Because the media queries only looked at dimensions this contributes to the difference in outcome. What I wanted was for the image hover code to be replaced with an onClick action but ONLY on tablets or phones. This would mean that on my 10" netbook the image hover should work, but on my 10" tablet it would not.
So following your posts, I tried using
php-mobile-detect to kill the onmouseover effect for mobile devices only. My initial syntax was incorrect, and with the help of a fellow Zenner
(who hopefully very soon will take over Image Handler's care and upkeep
), I now have a means to get Image Handler's image hover behaving as I wish. The image hover now works on my 10" netbook, but not on my 10" tablet or my smartphone.
The point I'm really trying to make with this is that there is more than one way to skin a cat, and I'm a believer of finding the right solution to resolve your business problem. The more research and discussion I have on this topic, the more I am discovering that a combination of methods may be needed to get me the results I want. I think I will not be the only one to come to this conclusion..
Bookmarks