diff --git a/js/script.js b/js/script.js new file mode 100644 index 0000000..875d568 --- /dev/null +++ b/js/script.js @@ -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(); +}); +