これは疲れます。ある要素から別の要素への単純な追加を試みています:
var contentBlob = $('<div></div>', {
"id" : "content-blob",
"css" : {
"display" : "none",
"color" : "red"
}
});
// this guy gets a full xhtml page with head and body.
// I don't want to use load()
model.getHtml(indexUrl, function(response){
if(response != 0){
contentBlob.html(response);
}
});
contentBlob.appendTo('body');
//I've verified the that the contentBlob (#content-blob) is in the body
// This should be super simple. No matter what I do, Its not appending
// the ul.
$('#content-blob > ul').appendTo('#contents-index-actual-index');
セレクターをトリプルチェックしましたが、すべてが合法に見えます。興味深い点の 1 つは、セレクターに ul を追加しないと #content-blob が追加されることです。