aboutsummaryrefslogtreecommitdiff
path: root/boca-1.5.2/src/hide.js
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2012-10-24 07:56:07 +0000
committercassiopc <cassiopc@gmail.com>2012-10-24 07:56:07 +0000
commit3a5f406ff59a05c0eddda191127d58b39cb8049b (patch)
treef3ff6adfea30fba8271dedc81d7d652737ae397e /boca-1.5.2/src/hide.js
parent9ae5ead9f89bcc7195420bdf6cc78db2c63dbeda (diff)
downloadboca-3a5f406ff59a05c0eddda191127d58b39cb8049b.tar.gz
boca-3a5f406ff59a05c0eddda191127d58b39cb8049b.zip
open dir for 1.5.2. I still must split devel and master in different branches to properly use git...
Diffstat (limited to 'boca-1.5.2/src/hide.js')
-rw-r--r--boca-1.5.2/src/hide.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/boca-1.5.2/src/hide.js b/boca-1.5.2/src/hide.js
new file mode 100644
index 0000000..beaa84e
--- /dev/null
+++ b/boca-1.5.2/src/hide.js
@@ -0,0 +1,28 @@
+var modifyClassName = function (elem, add, string) {
+var s = (elem.className) ? elem.className : "";
+var a = s.split(" ");
+if (add) {
+ for (var i=0; i<a.length; i++) {
+ if (a[i] == string) {
+ return;
+ }
+ }
+ s += " " + string;
+ }
+else {
+ s = "";
+ for (var i=0; i<a.length; i++) {
+ if (a[i] != string)
+ s += a[i] + " ";
+ }
+ }
+elem.className = s;
+}
+function toggleGroup(n) {
+ //alert(n);
+ var currentClass = document.getElementById("myscoretable");
+ for (var i=1; i<20; i++) {
+ modifyClassName(currentClass,true,"sitehide"+i);
+ }
+ modifyClassName(currentClass,false,"sitehide"+n);
+}