Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function initAnimations2() {
  2.         var elements2 = document.querySelectorAll(".grid-item, .tg-simpleimghover2");
  3.         for (var ele of elements2) {
  4.             if (isVisible(ele)) {
  5.                 if (ele.classList.contains('nsg-animation')) return true;
  6.                 ele.classList.add('nsg-animation')
  7.                 anime({
  8.                     width: '100%',
  9.                     duration: 600,
  10.                     direction: 'alternate',
  11.                     targets: ele.querySelector(':scope > a > div > span'),
  12.                 });
  13.                 anime({
  14.                     opacity: 1,
  15.                     delay: 550,
  16.                     targets: ele.querySelector(':scope > a > div > img'),
  17.                 });
  18.                 anime({
  19.                     opacity: 1,
  20.                     // delay: 650,
  21.                     targets: ele.querySelector(':scope > a + figcaption'),
  22.                 });
  23.  
  24.                 // anime({
  25.                 //  width: '100%',
  26.                 //  duration: 1000,
  27.                 //  direction: 'alternate',
  28.                 //  easing: 'easeInOutSine',
  29.                 //  targets: ele.querySelector(':scope > div > span'),
  30.                 // });
  31.                 anime({
  32.                     opacity: 1,
  33.                     delay: 550,
  34.                     targets: ele.querySelector(':scope > div > img'),
  35.                 });
  36.             }
  37.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement