gpt4 book ai didi

javascript - 获取在 WP 中实现的 'slide down' js 面板

转载 作者:行者123 更新时间:2023-11-28 13:37:29 26 4
gpt4 key购买 nike

我正在尝试在 Wordpress 中实现一个非常简单的垂直向下滑动面板,我试过 jbar (http://tympanus.net/codrops/2009/10/29/jbar-a-jquery-notification-plugin/) 和我在 http://jsfiddle.net/ahr3U/ 找到的一个简单的 JS 方法

但我仍然无法实现它,我已经尝试在 footer.php 关闭之前以及在 header.php 中插入以下代码,并且仍然没有出现。

   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
<script>

$(document).ready(function(){
$("#notification").addClass("visible");
});

</script>

和 CSS:

#notification {
background-color: #F00;
color: #FFF;
height: 25px;
position: absolute;
top: -25px;
width: 100%;
transition: top 0.5s;
-moz-transition: top 0.5s;
-webkit-transition: top 0.5s;
-o-transition: top 0.5s;

#notification.visible {
top: 0px;

通过 div 的 HTML CTA,我试过用 <head> 调用 <body>

<div id="notification">Page load complete...</div>

最佳答案

尝试将脚本代码放入,并确保关闭包含 jquery 库的第一个脚本标签

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>

关于javascript - 获取在 WP 中实现的 'slide down' js 面板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9164188/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com