JSFiddle - React, Tailwind, and code Playground

by billyonecan

HTML

<div class="alpha">
    <a href="http://www.url.com">Example</a>
    Plus some other stuff which may contain links, etc. that I don't want to copy to the other div.
</div>

<div class="beta">
    View Details
</div>

JavaScript

$link = $('.alpha').find('a').clone().text('');
$('.beta').contents().wrap($link);