开发者 | jrt341 |
---|---|
更新时间 | 2024年9月6日 03:12 |
PHP版本: | 3.0.1 及以上 |
WordPress版本: | 6.6.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
Here is the basic markup for how the speed bump is displayed.
<div id="trelsb-external-link-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="trelsb-external-link-modal-message">
<p id="trelsb-external-link-modal-message">
You are about to leave the current site.
</p>
<a class="button trelsb-external-link-modal-continue" tabindex="1" href="https://clickedlinkurl.com" aria-label="Continue">
Continue
</a>
<span class="button trelsb-external-link-modal-close" tabindex="2" aria-label="Close">
Cancel
</span>
</div>
You can style the speed bump just like you would any other HTML elements.
In the off chance that you have a link not working with this plugin like you expect it to you can use the trelsb_handle_links function in your own JavaScript file to make the speed bump activate when the link is clicked. Just add a class name to the link and then use the code below.
jQuery(".link_class_name").click(function(event) {
trelsb_handle_links(event, this)
});