Using jquery to dynamically change a bitmap of SRC found that CSS is not good to use and attr seems to be able to manipulate all attributes, including jquery not encapsulated attributes, specifically implemented as follows, interested friends can refer to the following
In jquery today, you want to dynamically change a bitmap of SRC found that CSS is not good to use, look at jquery documents as if CSS is the attribute of setting styles, such as color, font, background, and so on, and attr seemingly can manipulate all attributes, including jquery not encapsulated attributes.
Copy Code code as follows:
$ ("#newClassImg"). attr ("src", "./images/plus3.jpg");//Change Picture source
$ ("#newClass"). CSS ("Background-color", "#d6d6d6");//Change background color
Suggest a jquery Chinese document Inquiry website
Http://jquery-api-zh-cn.googlecode.com/svn/trunk/index.html