Skip to content

Commit

Permalink
fixing ui of pokemon types
Browse files Browse the repository at this point in the history
  • Loading branch information
yashrajbharti committed Jan 1, 2024
1 parent a29ef6d commit 96a3c4b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,14 @@ const buildUI = (typeWrapper, types, index) => {
img.classList.add("type-disc");
typeWrapper.appendChild(img);
}

addListeners();
};

const addListeners = () => {
document.querySelectorAll(".type-disc").forEach((disc) => {
disc.addEventListener("click", () => {
disc.remove();
});
});
};
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,8 @@ img.pokemon {

.arlo .counter {
translate: 5px 0;
}

.pokemon {
pointer-events: none;
}

0 comments on commit 96a3c4b

Please sign in to comment.