Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%--
- Document : index
- Created on : Jan 4, 2012, 11:08:04 AM
- Author : USER
- --%>
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>ITCUP Scoreboard</title>
- <link href="style.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- body {
- background-image: url(Images/bg.png);
- background-repeat: repeat;
- margin-left: 0px;
- margin-top: 0px;
- margin-right: 0px;
- margin-bottom: 0px;
- }
- </style>
- <!--SCROLL TO-->
- <script type="text/javascript" src="JS/jquery-1.4.2.min.js"></script>
- <script type="text/javascript" src="JS/jquery.scrollTo-1.4.2-min.js"></script>
- <script type="text/javascript">
- $(function() {
- function scroll(direction) {
- var scroll, i,
- positions = [],
- here = $(window).scrollTop(),
- collection = $('.post');
- collection.each(function() {
- positions.push(parseInt($(this).offset()['top'],10));
- });
- for(i = 0; i < positions.length; i++) {
- if (direction == 'next' && positions[i] > here) { scroll = collection.get(i); break; }
- if (direction == 'prev' && i > 0 && positions[i] >= here) { scroll = collection.get(i-1); break; }
- }
- if (scroll) {
- $.scrollTo(scroll, {
- duration: 750
- });
- }
- return false;
- }
- $("#next,#prev").click(function() {
- return scroll($(this).attr('id'));
- });
- $(".scrolltoanchor").click(function() {
- $.scrollTo($($(this).attr("href")), {
- duration: 750
- });
- return false;
- });
- });
- </script>
- </head>
- <body>
- <div id="header">
- <ul id="nav">
- <li><a href="#secgradeschool" class="scrolltoanchor" id="gradeschool"></a></li>
- <li><a href="#sectop" class="scrolltoanchor" id="top"></a></li>
- <li><a href="#sechighschool" class="scrolltoanchor" id="highschool"></a></li>
- </ul>
- </div>
- <div id="sectop">
- </div>
- <div id="secgradeschool">
- <div class="list"></div>
- <div class="control">
- <a href="#secgradeschoolscore" class="scrolltoanchor" id="gsnext"></a>
- <input type="text" name="txt_schoolName">
- <input type="submit" value="Save" name="btn_addSchool">
- <input type="submit" value="Delete" name="btn_deleteSchool">
- </div>
- </div>
- <div id="secgradeschoolscore">
- </div>
- <div id="sechighschool">
- <div class="list"></div>
- <div class="control">
- <a href="#sechighschoolscore" class="scrolltoanchor" id="hsnext"></a>
- </div>
- </div>
- <div id="sechighschoolscore">
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment