replacement of toggle function code

replacement of toggle function code

toggle function is depreciated so what is its replacement. i have this function and i cannot convert it kindly help me!
function toggleInteractContainers(x) {
if ($('#'+x).is(":hidden")) {
$('#'+x).slideDown(200);
} else {
$('#'+x).hide();
}
$('.interactContainers').hide();