on the "left sidebar" of my pages, i have a vertical menu.
Over the vertical Menu I have a simple Text-Box-Widget with an image-button to show/hide the menu.
Therefore i want to change the weight of the "left sidebar" and show/hide the widgets in the left sidebar.
Until now i have the following js-code, to show/hide the widgets.
But how can i set the width of the left sidbar with javascript.
I find no id for the left sidebar - only the class 'colone'.
Because I'm not very familar with css - can somebode help me?
I don't want to change the theme to place an id that I can use!
Code:
<script language="JavaScript" type="text/javascript"> function NavigationShowHide(parName){ if(document.getElementById(parName).title == "Hide Menu") { document.getElementById(parName).title = "Show Menu"; document.getElementById(parName).src = "images/showMenu.png"; top.document.getElementById('widget-1').style.visibility = 'hidden'; top.document.getElementById('widget-2').style.visibility = 'hidden'; // >>> How to change the weight of Left Sidebar? // top.document.getElementById('colone').style.width = '60px'; } else { document.getElementById(parName).title = "Hide Menu"; document.getElementById(parName).src = "images/hideMenu.png"; top.document.getElementById('widget-1').style.visibility = 'visible'; top.document.getElementById('widget-2').style.visibility = 'visible'; // >>> How to change the weight of Left Sidebar? // top.document.getElementById('colone').style.width = '200px'; } } </script>
Ralf