JSFiddle - React, Tailwind, and code Playground
by jomanlk
HTML
<p>This is the text 1</p>
<p>This is the text 2</p>
<p>This is the text 3</p>
<p>This is the text 4</p>
<p>This is the text 5</p>
<p>This is the text 6</p>
<p>This is the text 7</p>
<p>This is the text 8</p>
<p>This is the text 9</p>
CSS
div {
background :#dadada;
}
JavaScript
$('p:gt(5)').wrapAll('<div>')