I was looking for .wrap(), .append(), .wrapall()and .insertAfter()and found solutions. I would like to take a new one divand wrap it around an html block. I don't have access to HTML, so I need to use jQuery.
The function .insertAfter()was perfect, but unfortunately it automatically closes the html tags.
The root of the problem is that I need to center two separate ones divthat do not have access to their HTML.
$(function () {
$('<div id="centerContainer">').insertAfter('#header');
$('</div>').insertAfter('#footer');
});
source
share