code: function beforeTransition(){
            if (typeof scope.joyride.config.steps[scope.joyride.current].afterStep === "function") {
              scope.joyride.config.steps[scope.joyride.current].afterStep(afterTransition);
            }
  
            else{
              afterTransition();
            }
          }
docs: //// check for afterStep function before going to next step