title: Jquery/Javascript create element
body: <p>Consider the following DOM manipulation problem: I need to create a span tag after clicking on some link. Because of speeding up the process I prefer using <code>document.createElement()</code>(pure Javascript) instead of the Jquery methods of creating HTML elements. The following code compiles properly but isn't working (maybe because of interferention between Javascript and Jquery). Any help will be greatly appreciated.</p>
  
  <pre><code>&lt;body&gt;
          &lt;a href="#"&gt;Create thumbnails&lt;/a&gt;
          &lt;script type="text/javascript"&gt;
              $('a').click(function(e) {
                  var newSpan=null;
                  newSpan = document.createElement('span');
                  newSpan.setAttribute('class','themes');
                  $('.themes').html('themes');
                  $('.themes').appendTo('body');
                  return false;
              });
          &lt;/script&gt;
      &lt;/body&gt;
  </code></pre>