如何为Chardin.js创建切换按钮? Chardin WebsiteChardin.js - 创建切换按钮
我知道剧本是所有链接是否正确,当我运行它下面的脚本显示了罚款:
$(document).ready(function(){
$('body').chardinJs('start');
});
不过,我想用户点击一个按钮来显示信息,而不是在文件加载。
我曾尝试:
<script>$('.button').on('click', function(){
$('body').chardinJs('start')
});</script>
与此:
<span class="button"><a href="#" class="btn btn-large primary" data-toggle="chardinjs" data-intro="This button toggles the overlay, you can click it, even when the overlay is visible" data-position="left">Show Me</a></span>
我怕我找错了树,任何人都可以请指教? 感谢您的期待。
此处还有一个Chardin.js演示网站,它实际上可以在桌面浏览器中运行:https://mrcsabatoth.github.io/chardin.js/ –