Sha256: 7a2dbb1039ff3cdf9a6a8cd35de5bb3719e5964870b6f55a76434fb97f8c8fbb

Contents?: true

Size: 997 Bytes

Versions: 15

Compression:

Stored size: 997 Bytes

Contents

const WhatsOn = {

  speed : input => {
    return input * 0.03;
  },

  slide : value => {

    let alert = $(".block.alert-content",value),
        feed  = $(".alert-feed",value),
        width = $(feed).width() + 100,
        clone = $(".alert-clone",value);
  
    $(alert).addClass("modify-grid");    
  
    const prep = gsap.timeline({ defaults : { ease : "none" }});
        
    const tl = gsap.timeline({ repeat : -1, paused : true, defaults : { ease : "none" }});
  
    tl.to([feed,clone],{ duration : WhatsOn.speed(width), x : - width });
  
    prep
    .to(alert,{
      duration : WhatsOn.speed(20),
      paddingLeft : 0
    })
    .call(()=>{
      tl.play();
    });
  
  },

  scroll : value => {

    let feed   = $(".feed",value),
        height = $(feed).height(),
        clone  = $(".clone",value);
        
    let tl = gsap.timeline({ repeat : -1, defaults : { ease : "none" }});
  
    tl.to([feed,clone],{ duration : WhatsOn.speed(height), y : - height });
    
  }
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
futuro-1.1.1 assets/js/footer/custom/5_WhatsOn.js
futuro-1.1.0 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.9 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.8 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.7 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.6 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.5 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.4 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.3 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.2 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.1 assets/js/footer/custom/5_WhatsOn.js
futuro-1.0.0 assets/js/footer/custom/5_WhatsOn.js
futuro-0.9.9 assets/js/footer/custom/5_WhatsOn.js
futuro-0.9.8 assets/js/footer/custom/WhatsOn.js
futuro-0.9.7 assets/js/footer/custom/WhatsOn.js