Difference between revisions of "Template:Team:Harvard BioDesign/skin2015.css"
Line 16: | Line 16: | ||
<!--[if lte IE 9]><link rel="stylesheet" href="assets/css/ie9.css" /><![endif]--> | <!--[if lte IE 9]><link rel="stylesheet" href="assets/css/ie9.css" /><![endif]--> | ||
+ | <script> | ||
+ | $(document).ready(function () { | ||
+ | $(document).on("scroll", onScroll); | ||
+ | |||
+ | //smoothscroll | ||
+ | $('a[href^="#"]').on('click', function (e) { | ||
+ | e.preventDefault(); | ||
+ | $(document).off("scroll"); | ||
+ | |||
+ | $('a').each(function () { | ||
+ | $(this).removeClass('active'); | ||
+ | }) | ||
+ | $(this).addClass('active'); | ||
+ | |||
+ | var target = this.hash, | ||
+ | menu = target; | ||
+ | $target = $(target); | ||
+ | $('html, body').stop().animate({ | ||
+ | 'scrollTop': $target.offset().top+2 | ||
+ | }, 500, 'swing', function () { | ||
+ | window.location.hash = target; | ||
+ | $(document).on("scroll", onScroll); | ||
+ | }); | ||
+ | }); | ||
+ | }); | ||
+ | function onScroll(event){ | ||
+ | var scrollPos = $(document).scrollTop(); | ||
+ | $('#menu-center a').each(function () { | ||
+ | var currLink = $(this); | ||
+ | var refElement = $(currLink.attr("href")); | ||
+ | if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) { | ||
+ | $('#menu-center ul li a').removeClass("active"); | ||
+ | currLink.addClass("active"); | ||
+ | } | ||
+ | else{ | ||
+ | currLink.removeClass("active"); | ||
+ | } | ||
+ | }); | ||
+ | } | ||
+ | </script> | ||
<style> | <style> | ||
Line 55: | Line 95: | ||
z-index: 5; | z-index: 5; | ||
} | } | ||
+ | |||
</style> | </style> | ||
Line 60: | Line 101: | ||
</head> | </head> | ||
<body> | <body> | ||
+ | |||
+ | <div class="m1 menu"> | ||
+ | <div id="menu-center"> | ||
+ | <ul> | ||
+ | <li><a class="active" href="#home">Home</a> | ||
+ | </li> | ||
+ | <li><a href="#portfolio">Portfolio</a> | ||
+ | </li> | ||
+ | <li><a href="#about">About</a> | ||
+ | |||
+ | </li> | ||
+ | <li><a href="#contact">Contact</a> | ||
+ | |||
+ | </li> | ||
+ | </ul> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div id="home">Content</div> | ||
+ | <div id="portfolio">Content1</div> | ||
+ | <div id="about">Content2</div> | ||
+ | <div id="contact">Content3</div> | ||
<!-- header --> | <!-- header --> |
Revision as of 01:43, 18 September 2015
Content
Content1
Content2
Content3
Welcome to the Harvard BioDesign 2015 wiki!
The "official" place where flocculation happens and llamas are appreciated.
How to navigate our site
Here is an easy guide to finding information on our wiki site. On the top of every page you will see a flask. When you click on it, it will open up the main navigation menu. The top section includes links of the different sections on the current page. The lower links are to switch to a new page. You can see all the pages by looking at our site map listed below. You can also get a brief idea of what you'll find on each page by scrolling down.
Click Here to see our site map