Advertisement
Guest User

Error: hideMenu(); not defined

a guest
Nov 26th, 2014
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. <script src="jquery-1.11.0.min.js"></script>
  2. <script src="jquery-migrate-1.2.1.min.js"></script>
  3. <style>
  4. body{
  5. background: black;
  6. }
  7.  
  8. div.close{
  9. bottom: 10%;
  10. left: 0;
  11. position: absolute;
  12. width: 100%;
  13. }
  14.  
  15. #menu ul{
  16. list-style-type: none;
  17. }
  18.  
  19. .search{
  20. border: 2px solid;
  21. border-color: black;
  22. border-radius: 25px;
  23. padding-left: 10;
  24. padding-top: 5%;
  25. width: 76%;
  26. height: 5%;
  27. overflow: hidden;
  28. }
  29.  
  30. #menu ul li{
  31. background: -webkit-linear-gradient(white, grey);
  32. background: -o-linear-gradient(white, grey);
  33. background: -moz-linear-gradient(white, grey);
  34. background: linear-gradient(white, grey);
  35. border: 2px solid;
  36. border-color: black;
  37. border-radius: 25px;
  38. padding-left: 10;
  39. padding-top: 5%;
  40. width: 70%;
  41. height: 5%;
  42. overflow: hidden;
  43. }
  44.  
  45. #menu{
  46. background: black;
  47. width: 15%;
  48. height: 100%;
  49. overflow: hidden;
  50. top: 0;
  51. left: 0;
  52. position: absolute;
  53. }
  54.  
  55. #main{
  56. top: 0;
  57. left: 5%;
  58. position: absolute;
  59. width: 90%;
  60. height: 100%;
  61. overflow: hidden;
  62. background: white;
  63. }
  64.  
  65. #menu-icon{
  66. top: 0;
  67. left: 0;
  68. position: absolute;
  69. </style>
  70. <input type="hidden" value="false" id="menu1">
  71. <input type="hidden" value="false" id="menu2">
  72. <title id="title">Out and Up</title>
  73. <script>
  74. window.addEventListener('load', onLoad);
  75. $.ajaxSetup ({cache: false});
  76. function checkMenus(){
  77. var menu1 = $("#menu1").val();
  78. var menu2 = $("#menu2").val();
  79. if(menu1 == "false" && menu2 == "false"){
  80.  
  81. }else{
  82.  
  83. }
  84. }
  85.  
  86. function updateTitle(){
  87. var place = 0;
  88. alert("Hi their");
  89. if(place == 0){
  90. $("#title").val() = "Out and Up!";
  91. place = 1;
  92. else{
  93. $("#title").val() = "";
  94. place = 0;
  95. }
  96. }
  97.  
  98. function load(place){
  99. $("#main").hide(500);
  100. if(place == "home"){
  101. $("#main").load("pages/home.html");
  102. }else if(place == "home"){
  103. $("#main").load("pages/home.html");
  104. }
  105. $("#main").hide(0);
  106. $("#main").show(500);
  107. hidemenu();
  108. }
  109.  
  110. function showMenu(){
  111. $("#menu").show(500);
  112. $("#menu-icon").hide(500);
  113. }
  114.  
  115. function hidemenu(){
  116. $("#menu").hide(500);
  117. $("#menu-icon").show(500);
  118. }
  119.  
  120. function onload(){
  121. $("#menu").hide();
  122. $("#main").load("pages/index.html");
  123. setInterval(checkMenus, 1000);
  124. setInterval(updateTitle, 1000);
  125. }
  126. function search(){
  127. alert("searching!");
  128. }
  129. </script>
  130. <div id="main">
  131. Sorry... Your browser may not be jQuery compatible
  132. </div>
  133. <div id="menu" onmouseout="menu1 = false;">
  134. <ul>
  135. <input type="text" id="input" placeholder="Search" style="width: 75%; height: 100%;" class="search"><input type="submit" class="search" id="search" style="width: 10%; height: 100%;" onclick="search();" value=">"><br>
  136. <li onclick="load('home');">Home</li>
  137. <li onclick="hidemenu();">Something</li>
  138. </ul>
  139. <div class="close">
  140. <ul>
  141. <li onclick="hidemenu();">Close menu!</li>
  142. </ul>
  143. </div>
  144. </div>
  145. <div id="menu-icon">
  146. <img src="images/menu.png" onclick="showMenu();">
  147. </div>
  148. <div id="time"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement