How to simplify my create element code?
<p>I am trying to create 2 elemets, 1 with id and 1 without.
I have the following code and want to know how to simplify it. Any helps? Thanks a lot.</p>

<pre><code> var element = $('&lt;div/&gt;').attr({'id': tool}).addClass('s-Tool')             
                .append(
                  $('&lt;div/&gt;').css({'padding': '0.5em 1em'}).html(text)
               );

//only different is attr id

 var elementClass = $('&lt;div/&gt;').addClass('s-Tool')             
                .append(
                  $('&lt;div/&gt;').css({'padding': '0.5em 1em'}).html(text) 
               );
</code></pre>
