create element on the fly and append a existing element to this, with using jquery
<p>my existing  code as follows </p>

<pre><code>$('#'+ContainerId).find('img').each(function(){
    // ...
});
</code></pre>

<p>I want to crate a div element on the fly and append this existing img to this new created div element.
Result must be like this which I want</p>

<pre><code>&lt;div style="text-align:center"&gt;&lt;img src=".." /&gt;&lt;/div&gt;
</code></pre>
