Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. var out = document.getElementById("output2");
  2. var args = ["About", "Games", "The Hideout", "Staff", "Contact Us",];
  3.  
  4. function displayMenu() {
  5. var ul = document.createElement('ul');
  6. ul.className = "mainMenu";
  7. args.forEach(function(name, index) {
  8. var li = document.createElement('li'),
  9. an = document.createElement('a');
  10. li.className = "mmenu-item-" + index;
  11. li.setAttribute = "link rel", "stylesheet", "type", "text/css", "href", "http://www.thegaminghideout.com/style.css";
  12. an.innerHTML = name;
  13. an.setAttribute('href', "http://www.thegaminghideout.com/" + name + ".html");
  14. li.appendChild(an);
  15. ul.appendChild(li);
  16. });
  17. out.appendChild(ul);
  18. }
  19.  
  20. <div id="navigation">
  21. <div class="navlinks">
  22. <div id="output2">
  23. <ul class="mainMenu">
  24. <li class="mmenu-item-0">
  25. <a href="http://www.thegaminghideout.com/About.html">About</a>
  26. </li>
  27. <li class="mmenu-item-1">
  28. <a href="http://www.thegaminghideout.com/Games.html">Games</a>
  29. </li>
  30. <li class="mmenu-item-2">
  31. <a href="http://www.thegaminghideout.com/The Hideout.html">The Hideout</a>
  32. </li>
  33. <li class="mmenu-item-3">
  34. <a href="http://www.thegaminghideout.com/Staff.html">Staff</a>
  35. </li>
  36. <li class="mmenu-item-4">
  37. <a href="http://www.thegaminghideout.com/Contact Us.html">Contact Us</a>
  38. </li>
  39. </ul>
  40. </div>
  41. </div>
  42. <script src="http://www.thegaminghideout.com/nav.js"></script>
  43. </div>
  44.  
  45. var out = document.getElementById("output2");
  46. var x = document.getElementByTagName("LI");
  47. var args = ["URL1", "URL2", "URL3", "URL4", "URL5",];
  48. function displayMenu() {
  49. var ul = document.createElement('ul');
  50. ul.className = "mainMenu";
  51. args.forEach(function(name, index) {
  52. var li = document.createElement('li'),
  53. an = document.createElement('a');
  54. li.className = "mmenu-item-" + index;
  55. li.setAttribute = "link rel", "stylesheet", "type", "text/css", "href", "http://www.thegaminghideout.com/style.css";
  56. an.innerHTML = name;
  57. an.setAttribute('href', "http://www.thegaminghideout.com/" + name + ".html");
  58. li.appendChild(an);
  59. ul.appendChild(li);
  60. });
  61. out.appendChild(ul);
  62.  
  63. #navigation {
  64. width: 760px;
  65. height: 35px;
  66. position: absolute;
  67. border-bottom: 2px solid #000000;
  68. background: orange;
  69. padding: 0px;
  70. }
  71. #navigation .padding {
  72. padding: 2px;
  73. }
  74. #navigation .navlinks {
  75. position: absolute;
  76. top: 1px; left: 0px;
  77. }
  78. #navigation .navlinks ul {
  79. margin: 0px;
  80. padding: 0px;
  81. text-align: center;
  82. list-style-type: none;
  83. width: 760px;
  84. height: 35px;
  85. }
  86. #navigation .navlinks li {
  87. position: relative;
  88. top: 5px;
  89. margin: 0px 5px 0px 5px;
  90. list-style-type: none;
  91. display: inline;
  92. }
  93. #navigation .navlinks li a {
  94. color: #000000;
  95. padding: 5px 0px 9px 0px;
  96. text-decoration: none;
  97. font-size: 18px;
  98. font-family: karmatic_arcaderegular;
  99. padding: 5px 0px 9px 0px;
  100. }
  101. #navigation .navlinks li a:hover {
  102. margin: 0px;
  103. color: #ffffff;
  104. background: orange;
  105. text-decoration: underline;
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement