私はこのスクリプトを ckech div ホバーに書きました。divにカーソルを合わせた後、divのクラスをマルチクラスに変更したい
$('#chkm').hover(function(){
$('#chkm').addClass(".main-quiz-holder .slide-container #hdiv");
});
私の部門:
<div style='float: right;' id='mdiv' >
<ul class="styledlist" >
<img src='images/system_help.png' id='ckekeKala' width='18px'/>
</ul>
</div>
私のCSS:
.main-quiz-holder .slide-container #mdiv {
cursor: pointer;
padding: 6px 10px;
margin: 5px 5px;
font-size:11px;
color: rgb(76, 76, 76);
border-radius: 4px 4px 4px 4px;
text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.3);
box-shadow: 0px 0px 0px 1px rgba(255, 255, 255, 0.2) inset, 0px 0px 6px 0px rgba(255, 255, 255, 0.3) inset, 0px 1px 2px rgba(0, 0, 0, 0.4);
background: -moz-linear-gradient(center top , rgb(246, 246, 246), rgb(212, 212, 212)) repeat scroll 0% 0% rgb(246, 246, 246);
border: 1px solid rgb(161, 161, 161);
}
.main-quiz-holder .slide-container #hdiv {
background: #ebe9f9;
background: -moz-linear-gradient(top, #ebe9f9 0%, #d8d0ef 50%, #cec7ec 51%, #c1bfea 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ebe9f9), color-stop(50%,#d8d0ef), color-stop(51%,#cec7ec), color-stop(100%,#c1bfea));
background: -webkit-linear-gradient(top, #ebe9f9 0%,#d8d0ef 50%,#cec7ec 51%,#c1bfea 100%);
background: -o-linear-gradient(top, #ebe9f9 0%,#d8d0ef 50%,#cec7ec 51%,#c1bfea 100%);
background: -ms-linear-gradient(top, #ebe9f9 0%,#d8d0ef 50%,#cec7ec 51%,#c1bfea 100%);
background: linear-gradient(to bottom, #ebe9f9 0%,#d8d0ef 50%,#cec7ec 51%,#c1bfea 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ebe9f9', endColorstr='#c1bfea',GradientType=0 );
}