为什么slideToggle()打开跨度两次?

时间:2022-10-05 08:44:05

http://jsfiddle.net/mBkM3/

http://jsfiddle.net/mBkM3/

Whenever I click the button, it opens twice and then closes.

每当我点击按钮时,它会打开两次然后关闭。

Why doesn't it just alternate open and close with the proper .5 sec animation?

为什么不用正确的.5秒动画来交替打开和关闭?

1 个解决方案

#1


3  

Try to do it this way:

尝试这样做:

$(".add-entry").css('display','block').hide();

http://jsfiddle.net/mBkM3/3/

http://jsfiddle.net/mBkM3/3/

#1


3  

Try to do it this way:

尝试这样做:

$(".add-entry").css('display','block').hide();

http://jsfiddle.net/mBkM3/3/

http://jsfiddle.net/mBkM3/3/