vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: Code Submissions :: > Menu on page

Menu on page - Posted By Further (further) on 19th Aug 08 at 8:35pm
Placement: Anywhere
Description: Duplicates your menu anywhere on the page.
Code:
 
  1. <script type="text/Javascript">
  2. // (c) Further [styles.vforums.co.uk]
  3. // Do not remove tag.
  4.  
  5. var mtext = "Quick menu:" // Text before menu
  6. var hidemenu = "0" // 0 = show main menu; 1 = hide main menu; 2 = hide main table
  7. var cmenu = "1" // 0 = Do not center menu; 1 = Center menu
  8.  
  9. if (hidemenu==1){
  10.      document.getElementsByTagName('table')[2].style.display='none';
  11. }
  12. if (hidemenu==2){
  13.      document.getElementsByTagName('table')[1].style.display='none';
  14. }
  15. if (cmenu==1){
  16.      document.write('<center>')
  17. }
  18. var menu = get('menu_buttons','id').getElementsByTagName('font')[0];
  19. mmenu = mtext + menu.innerHTML;
  20. document.write(mmenu)
  21. if (cmenu==1){
  22.      document.write('</center>')
  23. }
  24. </script>