diff options
| author | root | 2014-11-17 01:42:48 +0100 |
|---|---|---|
| committer | root | 2014-11-17 01:42:48 +0100 |
| commit | f7755964e8703d66cee123a18519a07d49df0ae0 (patch) | |
| tree | d86a933802e200cf5d4e487afbd9d8bb121f5146 /tools/footer.php | |
| parent | 4168f7aff52f6e7cf7320e42252227dac5169c4a (diff) | |
| download | tools.iamfabulous.de-f7755964e8703d66cee123a18519a07d49df0ae0.tar.gz | |
modified for use case
Diffstat (limited to 'tools/footer.php')
| -rw-r--r-- | tools/footer.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/footer.php b/tools/footer.php index 9bc6c55..fedea9f 100644 --- a/tools/footer.php +++ b/tools/footer.php @@ -7,3 +7,21 @@ </div> </div> </div> + <script> + function addClass(id,new_class){ + if (id == "") return; + var i,n=0; + + new_class=new_class.split(","); + + for(i=0;i<new_class.length;i++){ + if((" "+document.getElementById(id).className+" ").indexOf(" "+new_class[i]+" ")==-1){ + document.getElementById(id).className+=" "+new_class[i]; + n++; + } + } + + return n; + } + addClass("<?php echo trim(str_replace("/index.php", "", $_SERVER["PHP_SELF"] ), "/");?>", "active"); + </script> |
