1

I have this sample:

link

CODE HTML:

<div class="form">
    <div class="elm1"></div>
    <div class="elm2"></div>

    <div class="elm1"></div>
    <div class="elm2"></div>

    <div class="elm1"></div>
    <div class="elm2"></div>
</div>

CODE JS:

$( "p" ).wrap( "<div></div>" );  //This is the function that can add a div element around element.

How can this fully to do what I want?

In the example above, is added a div to all the paragraph... I want to start div from "elm1" and closed at "elm2".

Can you help me please fix this?

Thanks in advance!

Marius
  • 1,181
  • 3
  • 15
  • 23

0 Answers0