【jQuery学习笔记--------操作类样式】

来源:互联网 发布:ubuntu 串口调试工具 编辑:程序博客网 时间:2024/06/18 11:55

操作类样式

追加样式

jQuery:addClass();

javascript:setAttribute()和getAttribute()结合来模拟addClass();

移除样式

jQuery:removeClass();

javascript:

切换样式

jQuery:toggleClass();

javascript:

 

判断样式

jQuery:hasClass();

javascript:

0 0