title: open <div> before element and close it after
body: <p>I'm creating a JQuery Plugin.
  I need to add automatically add a <code>&lt;div id="id"&gt;</code>before some code and the <code>&lt;/div&gt;</code> after.</p>
  
  <p>When i do it with <code>$('#search').before('&lt;div id=id&gt;')</code> the div automatically close...</p>
  
  <p>this is the code:</p>
  
  <pre><code>&lt;div id="id"&gt;&lt;/div&gt;
  
  &lt;input type="text"value="" id="search"&gt;&lt;/input&gt;
  &lt;select id="select"&gt;&lt;/select&gt;
  &lt;table id="table"&gt;&lt;/table&gt;
  &lt;div id="current"&gt;&lt;/div&gt;
  &lt;div id="pagination"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>i need to open a "div" before "#search" and close it after "#pagination"</p>