javascript - intro.js - 添加 Shift + ?键盘热键/快捷键支持启动(或触发)introJs().start()

标签 javascript dom-events key-bindings intro.js

如何让 mousetrap 启动 intro.js 导览?

SHIFT + ? 将... <a href="javascript:void(0);" onclick="startIntro();">launch tour</a>

最佳答案

这是我用来实现结果的代码:

<script type="text/javascript">
Mousetrap.bind(["?"], function(e) {
    startIntro();
});
</script>

关于javascript - intro.js - 添加 Shift + ?键盘热键/快捷键支持启动(或触发)introJs().start(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41651404/

相关文章:

php - DIV 视频仅在第一次加载首页时显示

d3.js - StopPropagation() 与 SVG 元素和 G

javascript - 函数作为 JS 中另一个函数的参数?

macos - Sublime Text : How to set up begining of line/end of line shortcuts to match the shell?

emacs - 如何在 emacs 中取消绑定(bind) C-mouse-down-1

javascript - 将服务器 API 作为 brunch 应用程序的一部分构建是一种不好的做法吗?

javascript - Three.js 着色器 Material 不显示粒子

javascript - 当用户打开列表框时向列表框添加处理程序?

macos - 尝试将 Ctrl-<right> 绑定(bind)到 emacs 中的前向词

javascript - 像异步 waterfall 一样执行 forEach