我有一个解决办法:
var addContent = {
...
append: function (obj, data, callBack) {
"use strict";
obj.append(data);
callBack();
}
}
The "addContent.append()" function add its data parameter value to its obj and call its callBack(), it is working as well! But the "obj parameter" hasn t been in DOM then those element what found it in "data parameter" not available.
例如:
var to = jQuery( <div> );
addContent.append(to, <div id="element1"></div> , function () {
alert(jQuery( #element1 ).length);
});
代码上写着"0"
你有什么解决办法吗?
谢谢!