Elimde söyle bir kod var
mause resmin üzerinde ise resim değişiyor, ancak ben burada radio buton seçili olduğunda 2. resmi aktif etmek isteseydim ne yapmam lazımdı, bilen varsa biraz yardım iyi olur
Radio buton img |
2 Mesajlar | 526 Okunma |
document.getElementById("c5").onmousemove = function(e) {
var radio = document.getElementById("rady5");
if (radio.checked){
e.target.src='images/gif/c8.png';
document.getElementById("c5").onmouseout = function(e) {
e.target.src='images/gif/c7.png';
};
} else return false;
};
$("#c5").mousemove(function () {
if($("#rady5").prop("checked")) {
$(this).prop("src","images/gif/c8.png");
$(this).mouseout(function () {
$(this).prop("src","images/gif/c7.png");
})
} else return false;
});