JSFiddle - React, Tailwind, and code Playground

by Deepak Manwal

HTML

<div class="map_object">
<span> test1 </span> 
<script></script>
</div>

<div class="map_object">
<span> test2 </span>
<script></script>
</div> 

<div class="map_object"> 
<span> test3 </span>
<script></script>
</div>

JavaScript

$(function(){
    $('span').each(function(){
        $(this).next('script').text($(this).text());
    });
})