获得'向下滑动'js面板在WP中实现

Getting a 'slide down' js panel implemented within WP

本文关键字:WP 实现 获得 js      更新时间:2023-09-26

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

但我仍然无法实现这一点,我尝试在关闭前将以下代码插入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;

}

HTML CTA通过div,我已经尝试过用<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>