更新时间:2022-12-11 08:41:33
将 switch 类移动到外部 div,像这样
Move the switch class to an outter div, like so
<div class="switch">
<div class="avg_words float_left">
A+ (hover to see score)
</div>
<div class="avg_num">
AVG = 98.35%
</div>
</div>
$('.switch').hover(function() {
$(this).find('.avg_words').hide();
$(this).find('.avg_num').show();
}, function() {
$(this).find('.avg_num').hide();
$(this).find('.avg_words').show();
});
更新的小提琴:http://jsfiddle.net/uXeg2/2/