假设我有以下DIV:
我有一个ajax调用,使用HTML标记将标记附加到这个div中。
我该如何使用jQuery代码实现它?
<div id="myDiv" style="display:none" title=""></div>
我有一个ajax调用,使用HTML标记将标记附加到这个div中。
$("#myDiv").html('').html(response);
我希望在响应内容之前将隐藏内容附加到主div,以便结果为
<div id="myDiv" style="display:none" title="">
//my hidden content
//here there will be the response HTML markup
</div>
我该如何使用jQuery代码实现它?
myDiv
的一个子节点。我想在这个子节点之前再添加另一个myDiv
的子节点。 - Lorenzo