本文实例讲述了jQuery给多个不同元素添加class样式的方法。分享给大家供大家参考。具体分析如下:
jQuery可以通过addClass()方法给多个不同的html元素同时添加相同的class
.important { font-weight:bold; font-size:xx-large; } .blue { color:blue; } Heading 1 Heading 2 This is a paragraph.
This is another paragraph.
This is some important text!
希望本文所述对大家的jQuery程序设计有所帮助。



