i have the following setup
<div class="article-content">
<div class='editors' id="mine">
<h2>My Text</h2>
<textarea name="my_text" id="my_text" class="my_test"></textarea>
</div>
<div class='editors' id="termsy_master" style="display:none;">
<h2>title</h2>
<textarea name="" id="" class="sm">text</textarea>
<textarea name="" id="" class="di">text</textarea>
</div>
</div>
im trying to
- clone “termsy_master”
- change the id to “his”
- change the h2 title to “new title”
- textarea sm id to “sm_new_id”
- textarea di id to “di_new_id”
- remove display none so it’ll be visible
- and append it to article-content
i have the following already done, but im not sure how to proceed
$('.article-content').append($("#termsy_master").clone());
There are lots of ways you could do it of course, but this seems to be more or less the simplest to me. Don’t overthink!