function showClose(id) { $('#a_' + id).html($('.div_' + id).toggle().is(':visible') ? 'Спрятать' : 'Показать'); }