Mam radiobuttona którego "ubrałem" w grafikę:
<div class="1"> <fieldset id="1" class="radio"> <legend>Rodzaj </legend><input type="radio" name="1" id="1" class="radio" value="cos" />
kod css:
.options fieldset span label {
position: relative;
font-size: 12pt;
color: #9c7c46;
padding: 16px 0 0 20px;
width: 175px;
height: 53px;
display: block;
display: table-cell;
background: url('../store/themes/main/images/button.jpg') no-repeat left top;
}
.options fieldset span input.radio:checked + label{
position: relative;
font-size: 12pt;
color: #ffffff;
padding: 16px 0 0 20px;
margin: 0;
width: 175px;
height: 53px;
display: block;
background: url('../store/themes/main/images/button_on.jpg') no-repeat center top;
}
i pięknie działa. Jak kliknę w niego podmiania mi tło i mam jakby inny przycisk.
Chciałm zrobić zdarzenie "hover", konkretnie:
div.options fieldset span input.radio:hover + label{
position: relative;
font-size: 12pt;
color: #ffffff;
padding: 16px 0 0 20px;
margin: 0;
width: 175px;
height: 53px;
display: block;
background: url('../store/themes/main/images/button_on.jpg') no-repeat center top;
cursor: pointer;
}
I problem taki że pod FF hula jak trzeba, ale pod IE (8 i 9), Operą, Chromem, ni hu hu
Zapytałem googla i widzę że IE pseudoklasę hover "widzi" jedynie przy <a>. chyba podobnie jest z Oprą i innymi (oprócz FF)
Pytanie jak to obejść coby i pod innymi przeglądarkamu smigało jak trzeba??
Próbowałem do szablonu strony taki kod java wstawić:
<script type="text/javascript">
$('input').hover(function () { $(this).toggleClass('hover'); });
</script>
i następnie dać klasę hover:
div.options fieldset input.hover{
position: relative;
font-size: 12pt;
color: #ffffff;
padding: 16px 0 0 20px;
margin: 0;
width: 175px;
height: 53px;
display: block;
background: url('../store/themes/main/images/button_on.jpg') no-repeat center top;
cursor: pointer;
}
ale niestety nie działa
Poprosze o jakies podpowiedzi.




Do góry
Zgłoś







