(7 intermediate revisions by the same user not shown) | |||
Line 208: | Line 208: | ||
} | } | ||
// Get the id of the <path> element and the length of <path> | // Get the id of the <path> element and the length of <path> | ||
− | var | + | var myline = document.getElementById("myline"); |
− | + | var length = myline.getTotalLength(); | |
− | + | var scrl; | |
− | + | window.addEventListener("scroll", myFunction); | |
+ | |||
− | + | // The start position of the drawing | |
− | + | document.getElementById("myline").style.strokeDasharray = length; | |
− | + | // Hide the triangle by offsetting dash. Remove this line to show the triangle before scroll draw | |
− | + | document.getElementById("myline").style.strokeDashoffset = length; | |
− | + | ||
− | + | // Find scroll percentage on scroll (using cross-browser properties), and offset dash same amount as percentage scrolled | |
− | + | ||
− | + | function myFunction() { | |
− | + | // What % down is it? | |
− | + | if (document.documentElement.scrollTop>2000){ | |
− | + | document.getElementById("myline").style.strokeDashoffset = 0; | |
− | + | } | |
− | + | else if(document.documentElement.scrollTop>1000){ | |
− | + | var scrollpercent = (document.documentElement.scrollTop -1000) / (-1000+2000); | |
− | + | // Length to offset the dashes | |
− | + | var draw = length * scrollpercent; | |
+ | // Reverse the drawing (when scrolling upwards) | ||
+ | document.getElementById("myline").style.strokeDashoffset = -(length - draw);} | ||
+ | else if (document.documentElement.scrollTop<1000){ | ||
+ | document.getElementById("myline").style.strokeDashoffset = length; | ||
+ | } | ||
+ | document.getElementById("lol").innerHTML = document.documentElement.scrollTop; | ||
} | } | ||
</script> | </script> | ||
</html> | </html> |
Latest revision as of 15:33, 13 October 2019
Education
Law
Events
Design
Results
Entrepreneurship
Demonstrate
Chalenges
Improve
Collaborations
Attributions
Results Attributions
Entrepreneurship
We want to create new standards for medical diagnostics by becoming major actors in the field of health, in order to bring down the empirical antibiotic treatment era.
Play full video
Our Work
?
Agile Methode : based on the Manifeste Agile written in 2001, this method is used for project development and relies on 4 fundamental values : individuals and interactions, working software, customer relationship, resilience.
photo 1
photo 2
coucou