src/cm/media/js/client/c_toc.js
changeset 425 d70552fc1a66
parent 424 2f9108930e47
child 440 0d2d10bc47bd
--- a/src/cm/media/js/client/c_toc.js	Fri May 11 16:50:30 2012 +0200
+++ b/src/cm/media/js/client/c_toc.js	Mon May 14 10:15:01 2012 +0200
@@ -71,7 +71,12 @@
   gToc['animationShow'] = animationShow ; 
   animationShow.set('to', { opacity: 1});
   gToc['animationShow-handle'] = animationShow.on('end', onTocShowAnimEnd, gToc);
-  document.getElementsByClassName('c-toc')[0].style.width = width + 'px';
+  if (typeof document.getElementsByClassName!='function') {
+    document.querySelectorAll('.c-toc')[0].style.width = width + 'px';
+  }
+  else {
+    document.getElementsByClassName('c-toc')[0].style.width = width + 'px';
+  }
 }
 
 toggleTocFn = function() {