> For the complete documentation index, see [llms.txt](https://docs.allthingsghl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.allthingsghl.com/funnels/texts/typerwriter-effect-1.md).

# Typewriter Effect

<figure><img src="https://3218217113-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9VzyehrjZZrwqcyJLvaZ%2Fuploads%2FWr8aXwAbk8k7EehuAZlU%2FGIF%20Recording%202025-06-17%20at%2010.17.39%20AM.gif?alt=media&amp;token=0329e743-9848-4fd1-a1ab-e8d378517347" alt=""><figcaption></figcaption></figure>

```html
<style>
#heading-JkcgZmWRdVW h1 u { text-decoration: none !important; }
</style>

<script>

elementType = "h1 strong u";
phrases = "Highlevel|Code Resources|Highlevel Marketplace Partners|Highlevel News";

typeSpeed         = 50;
unTypeSpeed       = 30;
startWait         = 2000;
phraseDisplayWait = 2000;
typingWait        = 700;

/* do not edit! */
dynoType = null;
currentText = '';
whichPhrase = 0;
phrasesArray = phrases.split('|');
classArray = elementType.split(',');

/* start! */
for(var i = 0; i < classArray.length; i++){
	classArray[i] = '.dynamic-text ' + classArray[i];
}
wait4TypeEl = setInterval(function(){
	typeEl = document.querySelector(classArray[0]);
	if(typeEl){
		clearInterval(wait4TypeEl);
		setTimeout(function(){
		
		},startWait/2);
		setTimeout(unTypePhrase,startWait);
	}
});
function typePhrase(){
	currentPhrase = phrasesArray[whichPhrase];
	for(var i = 0; i < classArray.length; i++){
		document.querySelector(classArray[i]).innerHTML = '';
	}
	typing = setInterval(function(){
		if(currentPhrase.length){
			snippet = currentPhrase.slice(0,1);
			currentPhrase = currentPhrase.substring(1);
			for(var i = 0; i < classArray.length; i++){
				document.querySelector(classArray[i]).innerHTML += snippet;
			}
		} else {
			clearInterval(typing);
			setTimeout(unTypePhrase,phraseDisplayWait);
		}
	},typeSpeed);
}
function unTypePhrase(){
	currentPhrase = document.querySelector(classArray[0]).innerHTML;
	typing = setInterval(function(){
		if(currentPhrase.length){
			currentPhrase = currentPhrase.substring(0,currentPhrase.length-1);
			for(var i = 0; i < classArray.length; i++){
				document.querySelector(classArray[i]).innerHTML = currentPhrase;
			}
		} else {
			clearInterval(typing);
			for(var i = 0; i < classArray.length; i++){
				document.querySelector(classArray[i]).innerHTML = '';
			}
			whichPhrase++;
			whichPhrase = (whichPhrase >= phrasesArray.length)? 0 : whichPhrase;
			setTimeout(typePhrase,typingWait);
		}
	},unTypeSpeed);
}
</script>
```

### Create Headline

1. Create Headline element on Funnel
2. Enter any text to your Headline element
3. **Bold** the text you want to have the typewriter effect on. &#x20;

### Add Code

1. Create a `Custom JavaScript/CSS` element on the funnel page under the Headline
2. Paste code into the block

### Update Code

1. Update Phrases Section:  \
   "phrases = `Highlevel|Code Resources|Highlevel Marketplace Partners|Highlevel News`
2. Update Heading CSS Selector
   1. Click on `Headline`
   2. Go to `Advanced`
   3. Scroll down and copy the text in "CSS Selector"&#x20;
      1. Example:  `#heading-JkcgZmWRdVW`
   4. Replace text on line 2 of code

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.allthingsghl.com/funnels/texts/typerwriter-effect-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
