How to add after selection

I am trying to add code after my current selection, I will say that I have this:

<div id = "test" "> </p>

</ div>

and want to add after closing the div, like this

<div id = "test" "> </p>

</ div>

<br />

Is there any way to do this?

+3
source share
2 answers

Use the method . after () :

$( '#test' ).after ( '<br/>' );
+9
source
$('#test').after('<br />');

What are you after?

+3
source

Source: https://habr.com/ru/post/1776873/


All Articles