<p class='sent' id='abc'>abc</p>
<p class='sent' id='abb'>abb</p>
<p class='sent' id='acc'>acc</p>
css
.sent:hover{
background-color:#e1e1e1; // works until the first click on .sent
}
js
$(".sent").click(function() {
$('.sent').css('background-color', 'transparent'); //works
$(this).css('background-color', '#e1e1e1'); //works
});
第一次点击sent
css后sent:hover
不起作用!?