'Intro.Js on embed HTML page elements
I have an embedded app (that I made) that I would like to add a guided intro.js tour over, but I can't seem to get it to work. I have tried with embed, object and iframe.
Here is my code so far
var app = document.getElementById("app");
// #app is the embedded site
var doc = app.contentDocument.body.getElementById("header-menu");
// select inner DOM and select an element inside the inner dom #header-menu
introJs().setOptions({
steps: [{
title: 'Welcome',
intro: 'Hello World! 👋' // this part works always
},
{
element: doc, // once this part is added, intro.js stops working as a whole
intro: '2nd slide'
}
]
}).start();
Let me know if I'm doing anything wrong.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
