I create an element dynamically:
var $el = $('<div class="someclass"></div>');
I want to append the element ($el) somewhere, but it shouldn't have an id.
How do I know if it has been appended before or not?
edit
I thought this should work
if($($el, "#target").length == 0)
$("#target").append($el);
but that was wrong
var $el = $("<div>").addClass("someclass");var $el = $('<div>', { 'class': 'someClass'} );