[英]Basic jQuery slideDown() not working
超级简单的问题-我是jQuery的新手,所以我对此有些傻。
https://jsfiddle.net/ve5f3oeb/
<a href="#" id="forgotten-show">I have forgotten my password ></a></div>
<form class="forgotten-pw" action=""><!-- This still needs to dropdown from clicking the #forgotten-show link above -->
<input type="email" placeholder="Your email"><!-- Prefill this field with their email address as they type just in case they have forgotten their email -->
<div class="row inline-center">
<input type="submit" value="Send password">
</div>
<p class="pw-reminder-sent">Your password has been sent</p>
</form>
$("#forgotten-show").click(function() {
$(".forgotten-pw").slideToggle( "slow", function() {
});
});
我有显示:没有; 设置在表单上,因此我想上下滑动。 正如我从文档中摘录的那样,jQuery当然是健全的。 我想念什么?
更新:好的,我的JSFIDDLE上了山雀。
我的问题是,当jQuery在同一页面上的script标记内但无法从链接的JS文件工作时,代码可以工作。
我知道文件已正确链接,因为我还有其他工作要做。
可能是您忘记了包括jQuery库吗?
尝试
https://jsfiddle.net/ve5f3oeb/2/
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
您没有包括jQuery库。
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
更新的小提琴:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.