gpt4 book ai didi

jquery - slidedown 没有按预期方式工作

转载 作者:行者123 更新时间:2023-11-28 11:11:20 24 4
gpt4 key购买 nike

我对 html、jquery 和 css 非常陌生。我正在尝试创建一个导航栏,当我单击该导航栏时,它将打开一个 jquery slidedown,但它没有按预期方式工作。下面是我为此目的编写的一小部分代码

      html: 
<ul class="dropdown">
<li id="cl1"><a class="ab" href="#">About </a></li >
</ul>
css:
<div class="target" style="z-
index:3;width:1000px;height:1000px;display:none;background-
color:white;opacity:0.8;position:fixed;top:0px;left:0px;">
<img src="horse.jpg" alt="horse" />
</div>
jquery:
$(document).ready(function() {

$(".ab").click(function(){
$(".target").slideDown( 'slow', function());
});
});


there are more sub menus to the above html

最佳答案

$(".ab").click(function(){
$(".target").slideDown( 'slow', function(){});
});

您忘记在函数中添加引号 {}

关于jquery - slidedown 没有按预期方式工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21969609/

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