関数に関するjqueryのマニュアルを読んでい.after()
ます:
$('.container').after($('h2'));
そしてそれは言う
「この方法で選択した要素を他の場所に挿入すると、複製されるのではなく移動されます」
だから私が複数ある場合
<div class='before' onclick='afterfunction();'><div>
、
<div class='after'></div>
divがクリックされた後に配置したい(クローンではなく移動する)このようなことをしますか?
var afterdiv = "<div class='after'></div>";
function afterfunction() {
$(this).after(afterdiv);
}
ご協力ありがとうございます!