jQuery - putting a closing div after the current this element?
<p>I'm trying to dynamically segment each generated-label and hardcoded input pair with div tag's. I seem to be able to get the div to surround the label (see source below), but I'd like the div to surround the input as well.</p>

<p>This has the div surround the input only:</p>

<pre>

​&lt;script>
$(document).ready(function(){
    $("#sg1 input").each(function(){
    $("​&lt;div>​&lt;label for=\""+$(this).attr("name")+"\">"+$(this).val()+"​&lt;/label>")
.insertBefore(this);
    });
});
​&lt;/script>

​&lt;form id="sg1">
    ​&lt;input name="member1" id="member1" value="jack" />
    ​&lt;input name="member2" id="member2" value="carter" />
    ​&lt;input name="member3" id="member3" value="jackson" />
    ​&lt;input name="member4" id="member4" value="tielk" />    
​&lt;/form>​
</pre>

<p><a href="http://jsfiddle.net/RM5wG/12/" rel="nofollow">http://jsfiddle.net/RM5wG/12/</a></p>

<p>Rather than having div's just around the label, I'd like to figure out how to get jQuery to append div's to the entire pair, i.e., final outlook like: </p>

<pre>
​&lt;div>
​&lt;label>...​&lt;/label>
​&lt;input />
​&lt;/div>
</pre>
