Difference between revisions of "Team:Grenoble-Alpes/Team"

Line 435: Line 435:
 
<script type="text/javascript">
 
<script type="text/javascript">
 
         var ancre_position;
 
         var ancre_position;
 +
        function getPositionTop (obj) {
 +
var curtop = 0;
 +
if (obj.offsetParent) {
 +
curtop = obj.offsetTop;
 +
while (obj = obj.offsetParent) {curtop += obj.offsetTop;}
 +
}
 +
return curtop;
 +
}
 
$(function(){
 
$(function(){
 
$(window).scroll(
 
$(window).scroll(
 
function () {
 
function () {
             ancre_position = document.getElementById("ancre1").offsetTop;
+
             ancre_position = getPositionTop(document.getElementById("ancre1"));
 
alert(ancre_position + " " + $(this).scrollTop());
 
alert(ancre_position + " " + $(this).scrollTop());
 
    if ($(this).scrollTop() > ancre_position) {  
 
    if ($(this).scrollTop() > ancre_position) {  

Revision as of 09:44, 25 July 2017

TEAM

TEAM

Acknowledgements

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Sponsors

Members Acknowledgements Sponsors

Designed by iGEM Grenoble-Alpes 2017 team | Site Map