Team:Aix-Marseille/Project
From 2014.igem.org
(Difference between revisions)
Line 2: | Line 2: | ||
<html> | <html> | ||
- | <script type="text/javascript"> | + | <script type="text/javascript">/* |
$(document).ready(function(){ | $(document).ready(function(){ | ||
$("#affix_nav").affix({ | $("#affix_nav").affix({ | ||
Line 10: | Line 10: | ||
}); | }); | ||
console.log($("#footer-box").height() + $(".footer").height() + $(".push").height()); | console.log($("#footer-box").height() + $(".footer").height() + $(".push").height()); | ||
- | }); | + | });*/ |
</script> | </script> | ||
+ | |||
+ | <script> | ||
+ | // Function to handle the movement of the sidebar in the Project | ||
+ | $(document).ready(function () { | ||
+ | var sidebar = $('#sidebar-project'); | ||
+ | var sidebarContainer = $('#sidebar-project-div'); | ||
+ | |||
+ | $(window).scroll(function (event) { | ||
+ | var ypos = $(this).scrollTop(); | ||
+ | var scrollTop = $(window).scrollTop(), | ||
+ | elementOffset = sidebar.offset().top, | ||
+ | distance = (elementOffset - scrollTop); | ||
+ | |||
+ | var collision_top = sidebar.overlaps($('#stop_top')); | ||
+ | var collision_bot = sidebar.overlaps($('#stop_bot')); | ||
+ | |||
+ | if (collision_top.hits.length) { /* Collision TOP */ | ||
+ | // To fix at the top of the .row div | ||
+ | sidebar.css({ top: '', | ||
+ | bottom: '', | ||
+ | position: '', | ||
+ | width: '' | ||
+ | }); | ||
+ | sidebarContainer.css({ position:'', | ||
+ | bottom: '', | ||
+ | right: '' | ||
+ | }); | ||
+ | if (distance < 141) { | ||
+ | // To fix at the top of the page while scrolling | ||
+ | sidebar.css({ top: '141px', | ||
+ | bottom: '', | ||
+ | position: 'fixed', | ||
+ | width: '262.5px' | ||
+ | }); | ||
+ | sidebarContainer.css({ position: '', | ||
+ | bottom: '', | ||
+ | right: '' | ||
+ | }); | ||
+ | } | ||
+ | } | ||
+ | else if (collision_bot.hits.length) { /* Collision BOTTOM */ | ||
+ | // To fix at the bottom of the .row div | ||
+ | sidebar.css({ bottom: '', | ||
+ | top: '', | ||
+ | position: '', | ||
+ | width: '' | ||
+ | }); | ||
+ | sidebarContainer.css({ position: 'absolute', | ||
+ | bottom: '0px', | ||
+ | right: '0px' | ||
+ | }); | ||
+ | if (distance > 141) { | ||
+ | // To fix at the top of the page while scrolling | ||
+ | sidebar.css({ top: '141px', | ||
+ | bottom: '', | ||
+ | position: 'fixed', | ||
+ | width: '262.5px' | ||
+ | }); | ||
+ | sidebarContainer.css({ position: '', | ||
+ | bottom: '', | ||
+ | right: '' | ||
+ | }); | ||
+ | } | ||
+ | } | ||
+ | else { | ||
+ | // To fix at the top of the page while scrolling | ||
+ | sidebar.css({ top: '141px', | ||
+ | bottom: '', | ||
+ | position: 'fixed', | ||
+ | width: '262.5px' | ||
+ | }); | ||
+ | sidebarContainer.css({ position: '', | ||
+ | bottom: '', | ||
+ | right: '' | ||
+ | }); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | |||
+ | |||
<div class="container"> | <div class="container"> | ||
<div class="row"> | <div class="row"> | ||
Line 42: | Line 124: | ||
<!-- Table of Contents --> | <!-- Table of Contents --> | ||
<!-- ***************** --> | <!-- ***************** --> | ||
- | <div class="col-md-3 project- | + | <div class="col-md-3" id="sidebar-project-div"> |
- | <div | + | <div id="sidebar-project"> |
- | <ul class="nav | + | <ul class="nav"> |
<li class="active"> | <li class="active"> | ||
<a href="#overall">Overall project summary</a> | <a href="#overall">Overall project summary</a> |
Revision as of 08:31, 7 August 2014
Overall project summary
...
Project Details
First Part
...
Second Part
...
Third Part
...
References
...
Materials and Methods
...
The Experiments
...
Results
...
Data analysis
...
Conclusions
...