<script language="javascript">
$(document).ready(function() {
$("#menu1").wrapInner( '<span class="out"></span>' ).append( '<span class="bg"></span>' );
// loop each anchor and add copy of text content
$("#menu1").each(function() {
$( '<span class="over">' + $(this).text() + '</span>' ).appendTo( this );
});
$("#menu1").hover(function() {
// this function is fired when the mouse is moved over
$(".out", this).stop().animate({'top': '40px'}, 250); // move down - hide
$(".over",this).stop().animate({'top': '0px'}, 250); // move down - show
$(".bg", this).stop().animate({'top': '0px'}, 120); // move down - show
}, function() {
// this function is fired when the mouse is moved off
$(".out", this).stop().animate({'top': '0px'}, 250); // move up - show
$(".over", this).stop().animate({'top': '-40px'}, 250); // move up - hide
$(".bg", this).stop().animate({'top': '-40px'}, 120); // move up - hide
});
});
</script>
$(document).ready(function() {
$("#menu1").wrapInner( '<span class="out"></span>' ).append( '<span class="bg"></span>' );
// loop each anchor and add copy of text content
$("#menu1").each(function() {
$( '<span class="over">' + $(this).text() + '</span>' ).appendTo( this );
});
$("#menu1").hover(function() {
// this function is fired when the mouse is moved over
$(".out", this).stop().animate({'top': '40px'}, 250); // move down - hide
$(".over",this).stop().animate({'top': '0px'}, 250); // move down - show
$(".bg", this).stop().animate({'top': '0px'}, 120); // move down - show
}, function() {
// this function is fired when the mouse is moved off
$(".out", this).stop().animate({'top': '0px'}, 250); // move up - show
$(".over", this).stop().animate({'top': '-40px'}, 250); // move up - hide
$(".bg", this).stop().animate({'top': '-40px'}, 120); // move up - hide
});
});
</script>
看看php生成的代码 是否有问题。
在浏览器里 看看php生成的代码是否有问题。