Let first note the main difference between siblings and find. Find search for descendant while sibling get same level nodes.
Knowing that should give you insight on what the problem is, right?
Well, .find
will not find your element if has no parent while .siblings
will not find any element that has parents.
ALSO, if there is only 1 element on the root of your data, sibling will return 0 element.
An infallible solution is to append your data to a fake DOM element like that :
$myWrapper = $('<div>').html(data).find('#main_wrapper');