Skip to content

Commit

Permalink
Update main-subtitle.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Lillow authored Jan 23, 2024
1 parent 5f7a396 commit 4f6eed0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions js/components/main-subtitle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const subtitle = document.querySelector(".main-subtitle > .text2");
// const subtitle = document.querySelector(".main-subtitle > .text2");
const box = document.querySelector(".main-box.-grey");

function typeWrite(element) {
Expand All @@ -10,11 +10,14 @@ function typeWrite(element) {
}

box.addEventListener("click", () => {
subtitle = null;
if (subtitle == null) {
subtitle.innerHTML = "FullStack Developer";
typeWrite(subtitle);
} else {
subtitle = null;
}
const subtitle = document.querySelector(".main-subtitle > .text2");
subtitle.innerHTML = "FullStack Developer";
typeWrite(subtitle);
// subtitle = null;
// if (subtitle == null) {
// subtitle.innerHTML = "FullStack Developer";
// typeWrite(subtitle);
// } else {
// subtitle = null;
// }
});

0 comments on commit 4f6eed0

Please sign in to comment.