$('[data-dropdown]').on('click', (e) => {
let dropdown = $(e.currentTarget).data('dropdown');
$("body").append('<div id="body"></div>');
$(`#${dropdown}`).addClass('active');
})
$(document).on("click", "#body", function(event){
$("#body").remove();
$('.dropdown').removeClass('active');
});