JSFiddle - React, Tailwind, and code Playground
HTML
<div class="switch avg_words float_left">
A+ (hover to see score)
</div>
<div class="avg_num">
AVG = 98.35%
</div>
CSS
.avg_num {
display: none;
}
JavaScript
$('.switch').hover(function() {
$(this).closest('.avg_words').hide();
$(this).next('div').closest('.avg_num').show();
}, function() {
$(this).next('div').closest('.avg_num').hide();
$(this).closest('.avg_words').show();
});