$('#elm').hover( function(){ $(this).addClass('hover') }, function(){ $(this).removeClass('hover') })//该片段来自于http://www.codesnippet.cn/detail/290920136233.html
来源: http://www.codesnippet.cn/detail/290920136233.html