[jQuery] n00b question on $().clone
hi, how does one check for the presence of a clone? i need to drag
copies of items from one list to another, then make the second list
sortable. so, i've been using the revert:true inside the draggable and
on drop creating a clone of each item - but, i want to prevent cloning
the same item twice. i want to check to see if an item's clone exists
before creating one, and only do so if it doesn't. i've been trying
this kind of thing:
if ( $j('#sort_list').find($j(drag).clone()) ){
$j(drag).clone().appendTo(this);
}
but it does not return false. i also tried working with .index == -1,
but never got that either. do my items need to have unique ids in
order for this to work?
thanks,
jen