From b09043fbf6d98adfd22f85a347256f545afb2c11 Mon Sep 17 00:00:00 2001 From: John Resig Date: Mon, 9 Jul 2007 00:02:32 +0000 Subject: [PATCH] Added a className tweak. All core and selector tests now pass. --- build/runtest/env.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); }, -- 1.7.10.4