• I’ve got a few simple JavaScript onmouseover image flips, but I’d like to replace them for mobile users with the hover image alone, so that by default they are viewing the images you’d see on desktop when hovering.

    Does anyone the easiest way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • That’s easy to do with a little jQuery trick by triggering the hover event like so:

    if ( $(window).width() < 767 ) {
    $(“.your-element”).trigger(‘hover’);
    }

    Thread Starter himynameisvan

    (@himynameisvan)

    Thanks, Vassilis! Sorry to be such a newb, but exactly where should the jQuery snippet go?

    I believe the theme I’m using utilizes jQuery…if so, do I need to figure out which file and then append it? Or is this something that can be simply put in the header?

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing image flips for mobile’ is closed to new replies.