Jquery closes automatically div added
06:59 28 Jan 2026

I have this html code generated by Content builder JS editor in my back office :

...
...
...
...
...

I need to add into my div #slider 2 news divs (.swiper-wrapper and .pagination) to make a slider, and have this final code. Because of editing problems in my Js editor, i can't set it in html ! :

...
...
...
...
...

In Jquery, i did this

$('#slider .column:first-child').before('
'); $('#slider .column:last-child').after('
');

The problem is that Jquery "autocloses" the divs appended.
How can i solve it ?

My result actually :

...
...
...
...
...
jquery