Typing Effect in Javascript by Editorial Staff Output View Horizontal Vertical HTML CSS JS Tidy Typing Effect in Javascript LOG IN HTML CSS JS Tidy @import url(//fonts.googleapis.com/css?family=Montserrat:300,700); .typing-slider { font-family: "Montserrat", sans-serif; color: #8d97ad; font-weight: 300; padding: 80px 0 0; overflow: hidden; background-repeat: no-repeat; background-size: cover; background-position: bottom center; } .typing-slider h1.title { font-size: 65px; font-weight: 700; } .typing-slider .btn-md { padding: 15px 45px; font-size: 16px; } HTML CSS JS Tidy var TxtType = function(el, toRotate, period) { this.toRotate = toRotate; this.el = el; this.loopNum = 0; this.period = parseInt(period, 10) || 2000; this.txt = ''; this.tick(); this.isDeleting = false; }; TxtType.prototype.tick = function() { var i = this.loopNum % this.toRotate.length; var fullTxt = this.toRotate[i]; if (this.isDeleting) { this.txt = fullTxt.substring(0, this.txt.length - 1); } else { this.txt = fullTxt.substring(0, this.txt.length + 1); } this.el.innerHTML = ''+this.txt+''; var that = this; var delta = 200 - Math.random() * 100; if (this.isDeleting) { delta /= 2; } if (!this.isDeleting && this.txt === fullTxt) { delta = this.period; this.isDeleting = true; } else if (this.isDeleting && this.txt === '') { this.isDeleting = false; this.loopNum++; delta = 500; } setTimeout(function() { that.tick(); }, delta); }; window.onload = function() { var elements = document.getElementsByClassName('typewrite'); for (var i=0; i >_Console Clear Console >_Console File Setting HTML Code Playground Setting Title Description Typing Effect in Javascript, the feature adds your text as an array data type. Catagory Javascript Tags Effect Hero Section Resource Add External Stylesheets and Script Leave a Comment Cancel replyCommentName Email Website Save my name, email, and website in this browser for the next time I comment. Notify me of new posts by email. Δ