toggle(function)

toggle(function)

$(selector).toggle(function)

should be equivalent to

$(selector).each(function() { $(this).toggle(function()); });