Sha256: a2a641735ce79e11cdeaf411630c6508fb0b6f66447036a70fc4014e307d1170

Contents?: true

Size: 1.2 KB

Versions: 19

Compression:

Stored size: 1.2 KB

Contents

Roller.default.over = (tl, input, value, output, index) => {

  tl.pause();

  input.map((index,value) => {

    if ($(value).hasClass("active")) {

      Save.input = value;
      Save.index = index;
      
      HandleClass([value,output[index]],'remove');

    }

  });

  HandleClass([value,output[index]],'add');

}

Roller.default.out = (tl, input, output) => {

  input.map((index,value) => {

    if ($(value).hasClass("active")) {

      HandleClass([value,output[index]],'remove');

    }

  });

  HandleClass([Save.input,output[Save.index]],'add');

  tl.play();

}

Roller.default.tl = (input, output) => {

  let tl = gsap.timeline({ repeat : -1 });

  input.map((index,value) => {

    let live = "";

    $(value.classList).map((index,value) => {
  
      if (value.startsWith("title-")) { live = value.slice(6); }
  
    });
  
    tl
    .call(HandleClass,[value,'add'])
    .call(HandleClass,[output[index],'add'])
    .call(HandleClass,[value,'remove'],"+=1")
    .call(HandleClass,[output[index],'remove']);    
  
    $(value).hover(function(){
  
      Roller.default.over(tl, input, value, output, index);
  
    }, function() {
  
      Roller.default.out(tl, input, output);     
  
    });

  });

}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
futuro-1.1.8 assets/js/footer/custom/4_Roller.default.js
futuro-1.1.7 assets/js/footer/custom/4_Roller.default.js
futuro-1.1.6 assets/js/footer/custom/4_Roller.default.js
futuro-1.1.5 assets/js/footer/custom/4_Roller.default.js
futuro-1.1.4 assets/js/footer/custom/4_Roller.default.js
futuro-1.1.3 assets/js/footer/custom/4_Roller.default.js
futuro-1.1.2 assets/js/footer/custom/4_Roller.default.js
futuro-1.1.1 assets/js/footer/custom/4_Roller.default.js
futuro-1.1.0 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.9 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.8 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.7 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.6 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.5 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.4 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.3 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.2 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.1 assets/js/footer/custom/4_Roller.default.js
futuro-1.0.0 assets/js/footer/custom/4_Roller.default.js