Laura Campbell

Receptionist

('#' + newId).find('[data-fetch]')); $('body').find('[data-reveal]').not('.delegated').addClass('delegated').click(function(){ reveal($(this).data('reveal'), this); }); if (next) next(); }); } function reveal(id, trigger) { let scope = $(id).data('scope'); $('.reveal[data-scope="'+scope+'"]').each(function(){ $(this).slideUp(); let id = $(this).attr('id'); $('[data-reveal="#'+id+'"]').not(trigger).removeClass('active-reveal'); }); if ($(trigger).hasClass('active-reveal')) { $(trigger).removeClass('active-reveal'); } else { $(trigger).addClass('active-reveal'); $(id).slideDown(); } }