Question: > 
> **Possible Duplicate:**  
> 
> [How do I create an element after the closing body tag](https://stackoverflow.com/questions/4792142/how-do-i-create-an-element-after-the-closing-body-tag) 
> 
> 
> 

Did a search, could not find this.

Is it possible to jQuery the closing `</body>` tag and then add some JS code just above?
IE: find:

```
$("</body>") 

```

Then add some JS script just above this tag?

Answer: 
You don't need to select the 'closing' tag, just select the body and append what you want:

```
$('body').append('<h1>foobar</h1>');

```

**update**

As @meagar mentioned correctly, with jQuery you don't select a 'closing' tag, but the whole 'element', e.g. the body, or a 'paragraph' (p) as a whole

Trying to make it more clear, this code:

```
<body>
    <p>my paragraph</p>
    <script>
       $(body).append('<p>new paragraph</p>');
    </script>
</body>

```

Will produce this result:

```
<body>
    <p>my paragraph</p>
    <script>
       $(body).append('<p>new paragraph</p>');
    </script>
    <p>new paragraph</p>
</body>

```

The new paragraph is appended at the end of the body
To append content to the body use the following.

```
$('body').append(htmltoappend);

```

> 
> Is it possible to jQuery the closing tag and then add some JS
>  code just above?
> 
> 
> 

Why would you want to insert *JS Code* above the closing body tag?