第二次单击显示帮助时,如何获得显示帮助的按钮。如果单击链接,它不会与 for 循环切换?
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;
}
```