I can get it to close fine, but when I click it again to open it, it flickers open and then closed again. AND: this is only in IE - in Firefox, clicking it does nothing. What follows is the code, any help would be greatly appreciated. Thanks!
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript">
- var xpos=null;
- var xposr=null;
- var chooser=1;
- function choice() {
- if(chooser==1){
- chooser=2;
- hideMenu();
- } else {
- chooser=1
- revealMenu();
- }
- }
- function hideMenu() {
- document.getElementById('menudiv').style.left=xpos;
- menuHider();}
- function menuHider() {
- if(xpos<-160){
- clearInterval(hideMenu);
- } else {
- xpos=xpos-1;
- setInterval(hideMenu,120);
- }
- }
- function revealMenu() {
- document.getElementById('menudiv').style.left=xposr;
- menuRevealer();}
- function menuRevealer() {
- if(xposr>=0){
- clearInterval(revealMenu);
- } else {
- xposr=xposr+1;
- setInterval(revealMenu,120);
- }
- }
- </script>