> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/traversal/.after.md).

# .after()

#### Inserting an HTML string

```javascript
$('#target').after('<p class="main">I am after! <strong>Very Strong </strong></p>');

//OUTPUT:
<p class="main">I am after! <strong>Very Strong </strong></p>
<div id="target"></div>
```

#### Inserting an element .

<pre class="language-javascript"><code class="lang-javascript">const newDiv = document.createElement('div');
<strong>newDiv.textContent = 'I am after!';
</strong>$('section > div*').after(newDiv));
</code></pre>

Insert Multiple elements.

```javascript
const elements = [
   document.createElement('span'),
   '<b>Bold Text</b>',
   document.createElement('i'),
   '<p>Paragraph</p>',
    ...$('input[type="checkbox"]*')
];

$('.all > div*').after(elements);
```
