Guest User

Untitled

a guest
May 24th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.80 KB | None | 0 0
  1. <%--
  2.    Document   : index
  3.    Created on : Jan 4, 2012, 11:08:04 AM
  4.    Author     : USER
  5. --%>
  6.  
  7. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  8. <!DOCTYPE html>
  9. <html>
  10.     <head>
  11.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  12.        <title>ITCUP Scoreboard</title>
  13.        
  14.        <link href="style.css" rel="stylesheet" type="text/css" />
  15. <style type="text/css">
  16. body {
  17.     background-image: url(Images/bg.png);
  18.     background-repeat: repeat;
  19.     margin-left: 0px;
  20.     margin-top: 0px;
  21.     margin-right: 0px;
  22.     margin-bottom: 0px;
  23. }
  24. </style>
  25. <!--SCROLL TO-->
  26. <script type="text/javascript" src="JS/jquery-1.4.2.min.js"></script>
  27. <script type="text/javascript" src="JS/jquery.scrollTo-1.4.2-min.js"></script>
  28. <script type="text/javascript">
  29. $(function() {
  30.  
  31.     function scroll(direction) {
  32.  
  33.         var scroll, i,
  34.                 positions = [],
  35.                 here = $(window).scrollTop(),
  36.                 collection = $('.post');
  37.  
  38.         collection.each(function() {
  39.             positions.push(parseInt($(this).offset()['top'],10));
  40.         });
  41.  
  42.         for(i = 0; i < positions.length; i++) {
  43.            if (direction == 'next' && positions[i] > here) { scroll = collection.get(i); break; }
  44.             if (direction == 'prev' && i > 0 && positions[i] >= here) { scroll = collection.get(i-1); break; }
  45.         }
  46.  
  47.         if (scroll) {
  48.             $.scrollTo(scroll, {
  49.                 duration: 750      
  50.             });
  51.         }
  52.  
  53.         return false;
  54.     }
  55.  
  56.     $("#next,#prev").click(function() {        
  57.         return scroll($(this).attr('id'));        
  58.     });
  59.  
  60.     $(".scrolltoanchor").click(function() {
  61.         $.scrollTo($($(this).attr("href")), {
  62.             duration: 750
  63.         });
  64.         return false;
  65.     });
  66.  
  67. });
  68. </script>
  69.  
  70.     </head>
  71.     <body>
  72.    
  73.        <div id="header">
  74.     <ul id="nav">
  75.         <li><a href="#secgradeschool" class="scrolltoanchor" id="gradeschool"></a></li>
  76.         <li><a href="#sectop" class="scrolltoanchor" id="top"></a></li>
  77.         <li><a href="#sechighschool" class="scrolltoanchor" id="highschool"></a></li>
  78.     </ul>
  79. </div>
  80. <div id="sectop">
  81. </div>
  82. <div id="secgradeschool">
  83.     <div class="list"></div>
  84.     <div class="control">
  85.         <a href="#secgradeschoolscore" class="scrolltoanchor" id="gsnext"></a>
  86.        
  87.         <input type="text" name="txt_schoolName">
  88.          <input type="submit" value="Save" name="btn_addSchool">
  89.          <input type="submit" value="Delete" name="btn_deleteSchool">
  90.          
  91.     </div>
  92. </div>
  93. <div id="secgradeschoolscore">
  94. </div>
  95. <div id="sechighschool">
  96.     <div class="list"></div>
  97.     <div class="control">
  98.         <a href="#sechighschoolscore" class="scrolltoanchor" id="hsnext"></a>
  99.     </div>
  100. </div>
  101. <div id="sechighschoolscore">
  102. </div>
  103.  
  104.     </body>
  105. </html>
Add Comment
Please, Sign In to add comment