Advertisement
Guest User

jquery

a guest
Nov 30th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.14 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html id="main">
  3.         <style>
  4.             a {
  5.                 -webkit-transition: all 0.375s;
  6.                 -moz-transition: all 0.375s;
  7.                 -ms-transition: all 0.375s;
  8.                 -o-transition: all 0.375s
  9.             }
  10.             ul
  11.             {
  12.                 list-style-type:none;
  13.                 margin:0;
  14.                 padding:0;
  15.                 overflow:hidden;
  16.             }
  17.             li
  18.             {
  19.                 float:left;
  20.                 padding-right: 10px;
  21.             }
  22.             a:link,a:visited
  23.             {
  24.                 display:block;
  25.                 width:;
  26.                 font-family:arial;
  27.                 font-weight:bold;
  28.                 color:#cccccc;
  29.                 text-align:center;
  30.                 padding:8px;
  31.                 text-decoration:none;
  32.                 text-transform:uppercase;
  33.                 border-bottom: 1px solid #cccccc;
  34.             }
  35.             a:hover,a:active
  36.             {
  37.                 color: #808080;
  38.                 border-bottom: 1px solid #808080;
  39.             }
  40.             #dynawidth {
  41.                 display:block;
  42.                 width:;
  43.                 font-family:arial;
  44.                 font-weight:bold;
  45.                 color:#cccccc;
  46.                 text-align:center;
  47.                 padding:8px;
  48.                 text-decoration:none;
  49.                 text-transform:uppercase;
  50.                 border-bottom: 1px solid #cccccc;
  51.             } #dynawidth:hover {
  52.                 color: #808080;
  53.                 border-bottom: 1px solid #808080;
  54.             }​
  55.         </style>
  56.     <body>
  57.         <ul>
  58.           <li><a href="#home" id="home">Home</a></li>
  59.             <li><a href="#about me" id="about">About Me</a></li>
  60.             <li><a href="#contact" id="contact">Contact</a></li>
  61.             <li><a href="#miniblog" id="miniblog">Mini-blog</a></li>
  62.             <li><a href="#buffer tab" id="buffer1">Buffer Tab</a></li>
  63.             <li><a href="#buffer tab" id="buffer2">Buffer Tab</a></li>
  64.         </ul>
  65.         <center>
  66.             <h1 style="font-family:arial; text-align:center; color:#777777; font-size:80px;">Swaraj</h1>
  67.         </center>
  68.     </body>
  69.     <script src="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript">
  70.         function getWinWidth() {
  71.             return $(document).width();
  72.         }
  73.         var home = document.getElementById('home');
  74.         home.style.width = (getWinWidth() / 7).toString() + "px";
  75.         var about = document.getElementById('about');
  76.         about.style.width = (getWinWidth() / 7).toString() + "px";
  77.         var contact = document.getElementById('contact');
  78.         contact.style.width = (getWinWidth() / 7).toString() + "px";
  79.         var miniblog = document.getElementById('miniblog');
  80.         miniblog.style.width = (getWinWidth() / 7).toString() + "px";
  81.         var buffer1 = document.getElementById('buffer1');
  82.         buffer1.style.width = (getWinWidth() / 7).toString() + "px";
  83.         var buffer2 = document.getElementById('buffer2');
  84.         buffer2.style.width = (getWinWidth() / 7).toString() + "px";​
  85.     </script>
  86. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement