将鼠标悬停在单选按钮替换上吗? [英] Mouseover on radio button replacement?

查看:91
本文介绍了将鼠标悬停在单选按钮替换上吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jQuery替换此页面上的单选按钮- http://www.justdoors .co/product-selection/,想知道是否也可以添加鼠标悬停效果?

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.

推荐答案

似乎所有替换的单选按钮都具有"imageCheck"类,因此您可以将效果绑定到鼠标悬停/鼠标停留上:

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");
});

这篇关于将鼠标悬停在单选按钮替换上吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆