jq 添加和移除样式

 1 <script>
 2 $(function(){
 3     $('.on1').each(function(){
 4         $(this).hover(
 5             function(){
 6                 $(this).addClass('ppNavOn');
 7         });
 8         $(this).mouseleave(
 9             function(){
10                 $(this).removeClass('ppNavOn');
11         });
12         
13     });
14 });
15 </script>
原文地址:https://www.cnblogs.com/the-moving-ear/p/3158139.html