wp 上 show/hide 预订表的按钮

Button to show/hide Booking Form on wp

我在 Wordpress 上修改了一个酒店主题网站,我在 header 部分添加了一个按钮并希望它显示我已经拥有的简单预订表格,我只需要知道我必须做什么请让它工作任何教程或想法?现在 2 天了,仍在寻找完成它的方法,仍在搜索中。 谢谢大家,

<div class="col-md-7 alignright"><a href=""><button class="apb-btn" style="margin-top:25px; border-radius:0px !important; background-color:#f3d339 !important;">CHECK AVAILABILITY</button></a>

$(document).ready(function(){
    //you should add class name for link to not target all links with click event
    $("a").click(function(){
        $(".apb-btn").toggle();
    });
});

如果你有 jquery 图书馆你可以这样做

https://jsfiddle.net/ak7tj4m7/2/