From: John Resig Date: Mon, 9 Jul 2007 00:02:32 +0000 (+0000) Subject: Added a className tweak. All core and selector tests now pass. X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=b09043fbf6d98adfd22f85a347256f545afb2c11 Added a className tweak. All core and selector tests now pass. --- diff --git a/build/runtest/env.js b/build/runtest/env.js index f3afb19..bf53efa 100644 --- a/build/runtest/env.js +++ b/build/runtest/env.js @@ -357,7 +357,10 @@ var window = this; set selected(val) { return this.setAttribute("selected",val); }, 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") || ""; }, set type(val) { return this.setAttribute("type",val); },