JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css">
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>

    <div data-role="collapsible" class="openMe">
       <h3>Hello 1</h3>
       <p>I'm the collapsible content. By default I'm closed, but you can click the header to open me.</p>
    </div>
    <div data-role="collapsible" class="openMe">
       <h3>Hello 2</h3>
       <p>I'm the collapsible content. By default I'm closed, but you can click the header to open me.</p>
    </div>
    <div data-role="collapsible" class="openMe">
       <h3>Hello 3</h3>
       <p>I'm the collapsible content. By default I'm closed, but you can click the header to open me.</p>
    </div>

<br />
<a href="#" data-role="button" id="openAll">Open All Collapsible</a>
<a href="#" data-role="button" id="closeAll">Close All Collapsible</a>

JavaScript

$('#openAll').on('click', function() {
    $('.openMe').trigger('expand');
});
$('#closeAll').on('click', function() {
    $('.openMe').trigger('collapse');
});