pablof7z / chardin.js

Simple overlay instructions for your apps.
https://heelhook.github.io/chardin.js/
Other
4.99k stars 507 forks source link

I cannot start chardin back on, from inside the stop event #106

Closed siddharth964 closed 4 years ago

siddharth964 commented 5 years ago

First of all, Great work. This looks way cooler than introJS. To my issue, I was hoping to create a walkthrough, using Chardin, so, I'm changing the data-intro using JQuery and trying to start and stop Chardin in a linear fashion. But it seems like we cannot restart Chardin again from inside the stop event, like as follows

$('body').on('chardinJs:stop', function () { if (sessionStorage.getItem("ChardinTest") == '0') { $('.switchChardin').removeAttr("data-intro"); $('.switchChardin').removeAttr("data-position"); $('.bordercust1').removeAttr("data-intro"); $('.bordercust1').removeAttr("data-position");

            $('body').chardinJs('start');
        }
    });
gbjbaanb commented 4 years ago

the new release has the ability to sequentially step through elements. there is a toggle function that should stop/start the lib but that's now unnecessary for you to use.