Add intro for dynamically added elements

My first steps point to the button that the user needs to click, and then after clicking the button, a dialog box opens in which the user can fill in some details.

what happens, I just get a background image, and intro does not indicate a dialog, since it starts when the page loads, when the dialog is not on the page yet ...

Is there any way to do this? (trunk and introjs)

I use the trunk to display the dialog with the click of a button

+4
source share
1 answer

intro.js, , , , , pageload. , html . ( intro.js , ).

, - :

var myHtml = '<div class="dialog">Here is the dialog!</div>';
this.$el.html(myHtml)

- :

introjs().addStep({
    element: this.el,
    intro: 'Here is the starting dialog'
}).start();

introjs , , , , , .

0

Source: https://habr.com/ru/post/1548229/


All Articles