how to append a div tag generated by jQuery dynamically with a javascript div tag element
<p>I want to append a div tag generated by jQuery dynamically with a javascript div tag element. My code looks like this:</p>

<pre><code>$(".remove_item").click(function(){
  $(this).hide("fast", function(){
  var id = $(this).parent().attr("id");
  var remove_item_id = document.getElementById(id);
  var block_element = document.getElementById("block");

  block_element.removeChild(remove_item_id);

  new_item = $("&lt;div/&gt;");
  new_item.attr("id", "item");
  new_item.attr("name", "item");
  new_item.addClass("div_image");
  new_item.append($("&lt;img/&gt;")
  .addClass("image")
  .attr("src", "/compare/sites/default/files/add_item.jpg")
  .attr("height", 50)
  .attr("width", 50));

  new_item.append($("&lt;span/&gt;")
  .addClass("new_item")
  .click(function(){
  $(this).parent().remove();
  }));

  block_element.append(new_item);
});
});
</code></pre>

<p>The code for appending the jQuery div tag with javascript div tag should look like this:
block_element.append(new_item);</p>

<p>But its giving error since we cannot bind since I am using javascript and jQuery in the same line. Is there any way to do it?</p>
