Added a className tweak. All core and selector tests now pass.

This commit is contained in:
John Resig 2007-07-09 00:02:32 +00:00
parent b147039acc
commit b09043fbf6

View file

@ -357,7 +357,10 @@ var window = this;
set selected(val) { return this.setAttribute("selected",val); }, set selected(val) { return this.setAttribute("selected",val); },
get className() { return this.getAttribute("class") || ""; }, get className() { return this.getAttribute("class") || ""; },
set className(val) { return this.setAttribute("class",val); }, set className(val) {
return this.setAttribute("class",
val.replace(/(^\s*|\s*$)/g,""));
},
get type() { return this.getAttribute("type") || ""; }, get type() { return this.getAttribute("type") || ""; },
set type(val) { return this.setAttribute("type",val); }, set type(val) { return this.setAttribute("type",val); },