这是 jQuery slideToggle 函数:
$('.class').click(function() {
$(this).parent().next().slideToggle('slow', function() {
// how can I access $('.class') that was clicked on
// $(this) returns the $(this).parent().next() which is the element
// that is currently being toggled/slided
});
});
在回调函数中,我需要访问当前的 .class 元素(被点击的那个)。我怎样才能做到这一点?