jQuery slideDown()动画不起作用 [英] jQuery slideDown() animation not working
问题描述
我试图让jQuery的 我也尝试手动指定速度,但最终结果是相同。 HTML: JavaScript: JSFiddle: http://jsfiddle.net/ahmadka/A2mmP/ 当您输入文本并尝试将其滑下时,code> p 元素已经显示。所以不需要动画。 I'm trying to get jQuery's I tried manually specifying the speed too, but end result was the same. HTML: JavaScript: JSFiddle: http://jsfiddle.net/ahmadka/A2mmP/ Your
这篇关于jQuery slideDown()动画不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! slideDown()
动画起作用,但在我的情况下,应该的文本向下滑动,出现 我如何使它与动画一起出现?
< section class =subscribe>
< button id =submitBtntype =submit>订阅< / button>
< p>< / p>
< / section>
$(function(){
$(#submitBtn)。click(function(event){
$(。subscribe p)。 (感谢您的兴趣!)。slideDown({
duration:4000
});
});
});
$(function(){
$(#submitBtn)。click函数(事件){
$(。subscribe p)。hide()。html(谢谢你的兴趣!)。slideDown(4000);
});
} );
slideDown()
animation to work, but in my case the text that should slide down, just appears .. How do I make it appear with the animation in place too ?<section class="subscribe">
<button id="submitBtn" type="submit">Subscribe</button>
<p></p>
</section>
$(function () {
$("#submitBtn").click(function (event) {
$(".subscribe p").html("Thanks for your interest!").slideDown({
duration: 4000
});
});
});
p
element is already displayed when you enter the text and try to slide it down. So no animation is needed.$(function () {
$("#submitBtn").click(function (event) {
$(".subscribe p").hide().html("Thanks for your interest!").slideDown(4000);
});
});