mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 05:10:41 +03:00
Create modal.js
This commit is contained in:
parent
2efb974c31
commit
4e12c2d325
1 changed files with 19 additions and 0 deletions
19
public/modal.js
Normal file
19
public/modal.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
var modal_open = document.querySelectorAll("[data-modal-open]");
|
||||
modal_open.forEach(onclick_load)
|
||||
|
||||
function onclick_load(item, index) {
|
||||
var block = item.getAttribute("data-modal-open");
|
||||
console.log("evet");
|
||||
console.log(item)
|
||||
document.querySelector(block).classList.toggle("no-active");
|
||||
document.querySelector("#user-edit").querySelector(".modal-close").onclick = function() {
|
||||
document.querySelector(block).classList.toggle("no-active");
|
||||
}
|
||||
|
||||
item.onclick = function() {
|
||||
document.querySelector(block).classList.toggle("no-active");
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue