Initial commit
This commit is contained in:
13
playarea/assets/main/js/profile.js
Normal file
13
playarea/assets/main/js/profile.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const change_subscriptions = document.querySelector('.change-subscriptions');
|
||||
const save_subscriptions = document.querySelector('.subscriptions-save');
|
||||
|
||||
change_subscriptions.addEventListener('click', () => {
|
||||
change_subscriptions.parentElement.classList.toggle('show-subscriptions');
|
||||
});
|
||||
save_subscriptions.addEventListener('click', () => {
|
||||
save_subscriptions.parentElement.parentElement.parentElement.classList.remove('show-subscriptions');
|
||||
});
|
||||
|
||||
document.addEventListener('click', (e) => {
|
||||
change_subscriptions.parentElement.contains(e.target) || change_subscriptions.parentElement.classList.remove('show-subscriptions');
|
||||
})
|
||||
Reference in New Issue
Block a user