我在以下开发网站上使用wordpress:http://b67.3d8.myftpupload.com/ 我想添加一个紧急按钮,就像在这里找到的:https://github.com/TodayDesign/panic-button
当我下载他们的软件并使用测试页时,可以使用ESC按钮,但在WP中它不起作用。按钮工作正常。
我基本上只是添加了他们的代码(并更改了CSS),但是WP并不正确:
<!-- begin panic button -->
<div id="panic-container" class="panic-button">
<span class="panic-button__text">Protect yourself online.</span>
<a class="panic-button__link"
href="https://www.domesticshelters.org/safe-surfing"
>
Learn how to hide your browsing history.
</a>
<a id="panic-button" class="panic-button__button"
href="https://www.weather.com"
>
<span class="panic-button__icon">×</span>
Quick exit (ESC)
</a>
</div>
<link rel="stylesheet" property="stylesheet" href="https://cdn.rawgit.com/studiothick/panic-button/v1.0.4/dist/panic.css" />
<script async src="https://cdn.rawgit.com/studiothick/panic-button/v1.0.4/dist/panic.min.js"></script>
<!-- end panic button -->
答案 0 :(得分:1)
您可以尝试使用最新版本的panic.js插件吗?https://cdn.rawgit.com/studiothick/panic-button/v1.2.0/dist/panic.min.js