can I add div before elements which be added dynamically in future?
<p>I have a drag drop elements facility. I want to add a div before any element, after it is dropped to the page. Is it possible ?
I tried to do it using live, but number divs it adds are strange. For first time, it add one or two and second time. it adds more than two.
I'm trying this :</p>

<pre><code>$('#PageContent &gt; .textElementClass').live('dblclick', function(e) {
ElementWidth=$(e.target).width();
targetElement=$(e.target);
$(e.target).css({'display':'none'});
$(e.target).before('&lt;div id="TextValue" style="'+ElementWidth+'"&gt;&lt;textarea cols="50" rows="10"&gt;Edit Content&lt;/textarea&gt;&lt;input type="button" value="Save" class="SaveContent"&gt;&lt;/div&gt;');

$('.SaveContent').live('click', function(e){
 firstChild=$('#TextValue &gt; textarea').html();
 $(targetElement).html(firstChild);
 $(targetElement).css({'display':'block'});
 $('#TextValue').remove();
});
   });
</code></pre>
