Difference between revisions of "Team:Pasteur Paris/test"

 
(12 intermediate revisions by the same user not shown)
Line 185: Line 185:
 
         </div>
 
         </div>
 
       </div>
 
       </div>
  <p id="lol" style="height:40px;width:auto;border:3px solid dodgerblue;">
+
  <p id="lol" style="height:40px;width:500px;border:3px solid dodgerblue;position:fixed;top:50px;">
 
       coucou
 
       coucou
 
     </p>
 
     </p>
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 length = document.getElementById("myline").getTotalLength();
+
       var myline = document.getElementById("myline");
      var test = document.documentElement.scrollTop > 950;
+
      var length = myline.getTotalLength();
document.getElementById("ligne").innerHTML="x = " + mouseX + "|  y = " + mouseY +"|" test;
+
var scrl;
       if (test){
+
      window.addEventListener("scroll", myFunction);
        // The start position of the drawing
+
        document.getElementById("myline").style.strokeDasharray = length;
+
        
document.getElementById("lol").innerHTML="x = " + mouseX + "|  y = " + mouseY +"|" test;
+
      // The start position of the drawing
        // Hide the triangle by offsetting dash. Remove this line to show the triangle before scroll draw
+
      document.getElementById("myline").style.strokeDasharray = length;
        document.getElementById("myline").style.strokeDashoffset = length;
+
  
        // Find scroll percentage on scroll (using cross-browser properties), and offset dash same amount as percentage scrolled
+
      // Hide the triangle by offsetting dash. Remove this line to show the triangle before scroll draw
        window.addEventListener("scroll", myFunction);
+
      document.getElementById("myline").style.strokeDashoffset = length;
 
+
        function myFunction() {
+
      // Find scroll percentage on scroll (using cross-browser properties), and offset dash same amount as percentage scrolled
          // What % down is it?
+
     
          var scrollpercent = (document.body.scrollTop + document.documentElement.scrollTop -950) / (document.documentElement.scrollHeight - document.documentElement.clientHeight -950);
+
      function myFunction() {
          // Length to offset the dashes
+
        // What % down is it?
          var draw = length * scrollpercent;
+
        if (document.documentElement.scrollTop>2000){
 
+
        document.getElementById("myline").style.strokeDashoffset = 0;
          // Reverse the drawing (when scrolling upwards)
+
        }
          document.getElementById("myline").style.strokeDashoffset = -(length - draw);
+
        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

  • Safety
  • Juddging Form
  • Human Pratices

  • Education
    Law
    Events
  • Project
  • Description
    Design
    Results
    Entrepreneurship
    Demonstrate
    Chalenges
    Improve
  • Team
  • Team members
    Collaborations
    Attributions
  • Sciences
  • Notebook
    Results Attributions
  • Awards
  • About Us
  • HUMAN  PRACTICES

    PROJECT

    TEAM

    Picto Sciences

    Sciences

    ecr-v-1
    ecr-p-2
    ecr-v-1
    ecr-p-2
    ecr-p-2
    ecr-p-2
    ecr-v-1
    ecr-p-2
    ecr-p-2
    ecr-v-1
    ecr-p-2
    ecr-v-1
    ecr-p-2
    ecr-p-2
    ecr-v-1
    ecr-p-2
    ecr-v-1
    ecr-p-2
    Sorry, your browser does not support inline SVG.

    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