JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css">
<div data-role="page" id="home"> 
    <div data-role="content">
        <div data-role="collapsible" data-collapsed="true" id="coll">
            <h3>hello</h3>
            <div data-role="collapsible" data-collapsed="false">
                <h3>11</h3>
                <span>test</span>
            </div>
            <div data-role="collapsible" data-collapsed="true">
                <h3>22</h3>
                <span>test</span>
            </div>
        </div>
    </div>
</div>

JavaScript

setInterval(function() {
    
    $('<div data-role="collapsible" data-collapsed="true"><h3>22</h3><span>test</span></div>').appendTo($('#coll div:first'));

        $('#coll').find('div[data-role=collapsible]').collapsible();  
        
}, 4000);