How to get element name to build dynamic elements from it
<p>I am building a jQuery function and need to build dynamic elements that will all share a comment name.</p>

<pre><code>$('#search').somefunction();
</code></pre>

<p>Inside of <code>somefunction</code> I will loop through all given elements and I then need to create dynamic elements that share a global name</p>

<pre><code> var newName = $(this)
 $('&lt;div id="'+newName+'originalsearch" /&gt;')
 $('&lt;div id="'+newName+'newsearch" /&gt;')
</code></pre>

<p><strong>Problem</strong></p>

<p>I could do <code>var newName = $(this).attr('id')</code>, but being a jquery plugin they could use any form of jquery selector. </p>

<p>So how can I make elements from the original selector without knowing its type?</p>
