I am using introJS in Angular 7. I have the following set up option:
introJS = introJs();
this.introJS.setOptions({
tooltipPosition: 'auto',
positionPrecedence: ['left', 'right', 'top', 'bottom'],
showBullets: true,
showStepNumbers:true,
steps: [
{
element: '#step1',
intro: "This is step1."
},
{
element: '#step2',
intro: "This is step 2, but is hidden in DOM."
},
{
element: '#step3',
intro: "This is step3, but it does not exist in DOM."
},
{
element: '#step4',
intro: "This is step 4",
}
]
});
this.introJS.start();
This step Options are static and it is possible, that the steps may be hidden or don't exist in the DOM. In this case, I would like the tour to ignore those steps and move forward, if a DOM element with that ID is not visible or does not exist in DOM.
I came across a JQuery alternative, for this, but no clue how to adjust it for Angular.