Change the image source on rollover using jQuery

前端 未结 14 1177
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 10:23

I have a few images and their rollover images. Using jQuery, I want to show/hide the rollover image when the onmousemove/onmouseout event happen. All my image names follow t

14条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 10:48

    I was hoping for an über one liner like:

    $("img.screenshot").attr("src", $(this).replace("foo", "bar"));
    

提交回复
热议问题