JSFiddle - React, Tailwind, and code Playground

by yccheok

HTML

<pre id="output1"></pre>
<pre id="output2"></pre>

<span loopx='{"operator":"maxis"}'>hello</span>
<span loop='{"operator":"maxis"}'>world</span>

JavaScript

$( document ).ready(function() {    
    $('span[loopx]').each(function(index) {
        var attr = $(this).attr('loopx');
        document.getElementById('output1').innerHTML = attr;
    });
    
    $('span[loop]').each(function(index) {
        var attr = $(this).attr('loop');
        document.getElementById('output2').innerHTML = attr;
    });
});