Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Typing Animation in Tagline
document.addEventListener("DOMContentLoaded", function () {
const tagline = document.querySelector("#tagline i");
const text = '"Trust me I\'m the Doctor"';
let index = 0;

function type() {
if (index < text.length) {
tagline.textContent += text.charAt(index);
index++;
setTimeout(type, 100);
}
}
type();
});