Mouseover on radio button replacement?

假如想象 提交于 2019-12-24 19:16:20

问题


I'm using jQuery to replace my radio buttons on this page - http://www.justdoors.co/product-selection/ and was wondering if it would be possible to add a mouseover effect as well?

I would like for the grey arrows that turn green when selected to change to green on mouseover/hover as the user goes up and down the list.


回答1:


It seems like all your replaced radio buttons have the class "imageCheck" so you could bind the effect on mouseover/mouseout:

$('.imageCheck')
    .mouseover(function() { 
        $(this).attr("src", "/changedimage.jpg");
    })
    .mouseout(function() {
        $(this).attr("src", "/originalimage.jpg");
});



回答2:


You could always also use CSS, see an example here.



来源:https://stackoverflow.com/questions/4783108/mouseover-on-radio-button-replacement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!