JSFiddle - React, Tailwind, and code Playground

HTML

<a class="multi-choice-btn" id="ext-gen69">
     <img class="x-panel-inline-icon feedback-icon " src="../images/choice_correct.png" id="ext-gen67">
    <img class="x-panel-inline-icon feedback-icon " src="../images/choice_correct.png" id="ext-gen67">
</a>


<td class="available date-end">
<span class="ui-state-default">20</span>
</td>

<div id="parent2" class="parent">
     <span>
         <b>This is sample text 1</b>
     </span>
     <span>
         <i>This is sample text 2</i>
     </span>
</div>

JavaScript

/*
var props = $(".multi-choice-btn").prop("attributes");
var span = $("<span>");
$.each(props, function() {
    span.attr(this.name, this.value);
});
$(".multi-choice-btn").children().unwrap().wrapAll(span);
*/

var $span = $("#parent2 span");
$span.replaceWith(function () { //alert(this.innerHTML);
    return $('<a href="#" />', 
    				$("#parent2 span a").html(this.innerHTML)
           );
});