jQuery源码浅谈系列-replaceWith()

jQuery源码浅谈系列---replaceWith()replaceWith(cpntent) ? ??@参数 content ?----String,Element,jQuery

jQuery源码浅谈系列---replaceWith()

replaceWith(cpntent) ? ?

?

@参数 content ?----String,Element,jQuery,Function

?

?? 用于将匹配元素替换掉的内容。如果这里传递一个函数进来,返回值必须是HTML字符串。

?

@example1 新的参数内容替换匹配已有的内容

?

?

<div class="box">  <div class="second">2</div>  <div class="first">1</div></div>