Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var _CONTENT = ["When I was 15, I took a Robotics Honors course at my high school. We designed and built robots using VEX robotics kits. To me, the most interesting part was building the drag-and-drop code and uploading it to the robot to control it. This is what inspired me to code. Before long, I was researching software development and decided the best language for me to start with would be Python. That was a year ago, and since then I've worked in HTML, CSS, JavaScript, and Java, and plan to further expand my developer capabilities from this point on."];
- var _PART = 0;
- var _PART_INDEX = 0;
- var _INTERVAL_VAL;
- var _ELEMENT = document.querySelector("#text");
- var _CURSOR = document.querySelector("#cursor");
- function Type() {
- var text = _CONTENT[_PART].substring(0, _PART_INDEX + 1);
- _ELEMENT.innerHTML = text;
- _PART_INDEX++;
- if(text === _CONTENT[PART]) {
- _CURSOR.style.display = "none";
- clearInterval(_INTERVAL_VAL);
- setTimeout(function() {
- _INTERVAL_VAL = setInterval(Delete, 50);
- }, 1000);
- }
- }
- _INTERVAL_VAL = setInterval(Type, 100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement