Difference between revisions of "Team:Tec-Monterrey/sandbox"

m
m
Line 259: Line 259:
  
 
             $(window).scroll(function(event) {
 
             $(window).scroll(function(event) {
 
+
              var hiding = document.getElementById("hiding-block");
  var hiding = document.getElementById("hiding-block");
+
              var hidingPos = hiding.offsetTop;
  var hidingPos = hiding.offsetTop;
+
              var bacteriaPos = document.getElementById("bacteria-nadando").offsetTop;
  var bacteriaPos = document.getElementById("bacteria-nadando").offsetTop;
+
 
+
  window.alert("hiding " + hidingPos);
+
  window.alert("bacteria " + bacteriaPos);
+
  
 
                 var scroll = $(window).scrollTop();
 
                 var scroll = $(window).scrollTop();
Line 273: Line 269:
 
                 var bacteriaTop = map(scroll, 900, 2000, -100, 100);
 
                 var bacteriaTop = map(scroll, 900, 2000, -100, 100);
 
                 var bacteriaRotate = map(scroll, 0, 700, 50, 0);
 
                 var bacteriaRotate = map(scroll, 0, 700, 50, 0);
                 if (scroll > position) {
+
                 if (bacteriaPos > hidingPos) {
 
                   $('#bacteria-nadando ').css('opacity','0');
 
                   $('#bacteria-nadando ').css('opacity','0');
 
                 } else {
 
                 } else {

Revision as of 18:44, 13 October 2018

Skip

E. coding
Tec-Monterrey
Seccion Acevedo Interactive Entertainement System Co. S.A. de C.V. Ind.

Contact Us

Sponsors