js correction

This commit is contained in:
Meylis Gazakow 2021-11-12 20:42:38 +03:00
parent 26c464c435
commit f71a82b5e5
2 changed files with 22 additions and 22 deletions

View File

@ -88,19 +88,19 @@ function sleep(time) {
window.onclick = function (e) {
if (drop != undefined) {
if (document.querySelector('.profile_drop').classList.contains('active') && !e.target.closest('.profile_head')) {
document.querySelector('.profile_drop').classList.remove('active');
}
}
// drop.forEach(drop => {
// if (drop != undefined) {
// drop.classList.contains('active') && !e.target.closest('.profile_head');
// drop.classList.remove('active')
// if (drop != undefined) {
// if (drop.classList.contains('active') && !e.target.closest('.profile_head')) {
// drop.classList.remove('active');
// }
// }
// );
drop.forEach(drop => {
if (drop != undefined) {
drop.classList.contains('active') && !e.target.closest('.profile_head');
drop.classList.remove('active')
}
}
);
if (register != undefined) {
if (register.classList.contains('active') && !e.target.closest('.register_body')) {

View File

@ -88,19 +88,19 @@ function sleep(time) {
window.onclick = function (e) {
if (drop != undefined) {
if (document.querySelector('.profile_drop').classList.contains('active') && !e.target.closest('.profile_head')) {
document.querySelector('.profile_drop').classList.remove('active');
}
}
// drop.forEach(drop => {
// if (drop != undefined) {
// drop.classList.contains('active') && !e.target.closest('.profile_head');
// drop.classList.remove('active')
// if (drop != undefined) {
// if (drop.classList.contains('active') && !e.target.closest('.profile_head')) {
// drop.classList.remove('active');
// }
// }
// );
drop.forEach(drop => {
if (drop != undefined) {
drop.classList.contains('active') && !e.target.closest('.profile_head');
drop.classList.remove('active')
}
}
);
if (register != undefined) {
if (register.classList.contains('active') && !e.target.closest('.register_body')) {