lundi 4 octobre 2021

IntroJs Hints and toggle show/hide with for loop

How can I get the button to show help when clicking on show help a second time. It is not toggling with the for loop if links are clicked?

        function introFunction() {
    if (false) {
        $("#helpFunc").html("Show Help");
        introJs().removeHints();
    } else {
        $("#helpFunc").html("Hide Help");
        introJs().showHints();
    }
    
    //hints = !hints;
        for (var i = 0, n = allLinks.length; i < n; i++) {
            allLinks[i].onclick = function () {
                $("#helpFunc").html("Show Help");
                introJs().removeHints()

            }

        }
        // add hints and set options here
        hints = !hints;
}

    ```


Aucun commentaire:

Enregistrer un commentaire