Skip to content

Instantly share code, notes, and snippets.

@zackbloom
Created October 28, 2015 15:45
Show Gist options
  • Save zackbloom/a4f0f071bffee59d0218 to your computer and use it in GitHub Desktop.
Save zackbloom/a4f0f071bffee59d0218 to your computer and use it in GitHub Desktop.

Revisions

  1. zackbloom created this gist Oct 28, 2015.
    38 changes: 38 additions & 0 deletions animate-shepherd.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    <script>

    var shepherdInterval = setInterval(function(){

    if (window.ShepherdInstallHelper && window.ShepherdInstallHelper.tour){

    clearInterval(shepherdInterval);

    ShepherdInstallHelper.tour.on('show', function(opts){
    var prev = opts.previous;
    var step = opts.step;

    if (!prev)
    return;

    prev.el.classList.add('shepherd-open');
    prev.el.classList.add('shepherd-enabled');

    step.once('show', function(){
    step.el.style.opacity = 0;
    step.el.style.pointerEvents = 'none';

    prev.el.style.transition = '1s transform ease-in-out';
    prev.el.style.transform = step.el.style.transform;

    setTimeout(function(){
    prev.el.classList.remove('shepherd-open');
    prev.el.classList.remove('shepherd-enabled');

    step.el.style.opacity = 1;
    step.el.style.pointerEvents = '';
    }, 1000);
    });
    });
    }
    }, 250);

    </script>