Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
$(document).ready(function(){ $('#tel-list-trigger').click(function () { $("#contacts").toggleClass('shower'); }); });
(function () { $(document).click(function(event) { if ($(event.target).closest(".wrapper").length) return; $("#contacts.active").removeClass("active"); }); $("#tel-list-trigger").click(function() { $('#contacts').toggleClass("active"); }); })();
$(document).click(function (e){ let drop = $('#contacts'); if (!drop.is(e.target) && drop.has(e.target).length === 0) { drop.removeClass('shower') } });
$(document).ready(function(){ $('#tel-list-trigger').click(function () { $("#contacts").toggleClass('shower'); }); $(document).click(function (e){ let drop = $('#contacts'); if (!drop.is(e.target) && drop.has(e.target).length === 0) { drop.removeClass('shower') } }); });