<div class="inner">
  hello world
</div>
.outer{
  border: 1px solid #ccc;
  padding: 10px;
}
$(".inner").wrap("<div class='outer'><div class='outer'></div></div>")

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js