SteamPunk_Devil

JS problem

Jul 22nd, 2015
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.98 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <link rel="stylesheet" href="main.css">
  5.         <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Exo" type="text/css">
  6.         <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Exo:700" type="text/css">
  7.         <title>Gamer.social - Find player - Home </title>
  8.         <!--<script src="jquery-1.11.3.min.js"></script>*/-->
  9.         <script type="text/javascript">
  10.             <!--
  11.                 function toggle_visibility(id) {
  12.                     var e = document.getElementById(id);
  13.                     if(e.style.display == 'block'){
  14.                         e.style.display = 'none';
  15.                     }else{
  16.                         e.style.display = 'block';
  17.                     }
  18.                 }
  19.            
  20.                 function toggle_color(id,id2, color, color2) {
  21.                     var e = document.getElementById(id);
  22.                     var a = document.getElementById(id2);
  23.                     if(e.style.background == color){
  24.                         e.style.background = color2;
  25.                         a.style.background = color;
  26.                     }else{
  27.                         e.style.background = color;
  28.                         a.style.background = color2;
  29.                     }
  30.                 }
  31.             //-->
  32.         </script>
  33.     </head>
  34.     <body>
  35.         <div id="topBar">
  36.             <div id="menuBar">
  37.                 <span class="menuText">Home</span>
  38.                 <span class="menuText">About Us</span>
  39.                 <span class="menuText">Contact Us</span>
  40.             </div>
  41.                 <div id="loginButton" onclick="toggle_visibility('loginBox')">
  42.                 <span id="loginText">Login / Join</span>
  43.             </div>
  44.         </div>
  45.         <div id="loginBox">
  46.             <span id="loginBoxTitle">Login</span>
  47.                 <div id="loginBoxBox">
  48.                 <div id="loginBoxLogin" onclick="toggle_color('loginBoxLogin','loginBoxJoin','#990000','#0C672A')">Login</div>
  49.                 <div id="loginBoxJoin" onclick="toggle_color('loginBoxJoin','loginBoxLogin','#0C672A')"/>Join</div>
  50.                 <form id="loginForm">
  51.                     <br>
  52.                     <br>
  53.                     <div class="loginBoxLoginText">Username or Email</div> 
  54.                     <input type="text" name="username" maxlength="20" class="loginBoxText">
  55.                     <div class="loginBoxLoginText">Password</div>
  56.                     <input type="password" name="password" class="loginBoxPass">
  57.                 </form>
  58.             </div>
  59.         </div>     
  60.     </body>
  61. </html>
Advertisement
Add Comment
Please, Sign In to add comment