Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 div,我希望它在单击某些内容时向下或向上滑动。我正在使用这样的函数 slideToggle() :
$('.business').slideToggle(1500, 'easeOutBounce');
它可以工作,有时在 Firefox 上有点不稳定。但是,当我尝试使用以下语法时它不起作用?
$('.business').slideToggle({duration: 1500, easing: 'easeOutBounce'});
为什么?他们不一样吗?
不,它们不一样。.slideToggle()不接受对象参数语法。
.slideToggle()