这里是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 元素(即被单击的元素)。我该如何做到这一点?