jquery SlideToggle - 在幻灯片之前调用
谁能建议如何在 SlideToggle 打开/关闭之前进行调用? 这是我的情况:
$('.accordion .d_row .c_row').live('click', function() {
$(this).nextAll('div.details').slideToggle(function() {
if($(this).is(":hidden")){
// do something
} else {
// do something
}
});
});
如果我调用 //do some 注释所在的任何内容,则在元素滑动打开时会触发该内容。有没有办法先调用函数,然后再执行滑行?
干杯
Can anyone suggest how to make a call within slideToggle before it opens/closes?
Here is my situation:
$('.accordion .d_row .c_row').live('click', function() {
$(this).nextAll('div.details').slideToggle(function() {
if($(this).is(":hidden")){
// do something
} else {
// do something
}
});
});
If i call anything where the //do something comment resides this getss fired whilst the element slides open. Is there a way to call, for example, a function first then perform the silde?
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在调用
slideToggle
之前运行代码。You can just run your code before calling
slideToggle
.