JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.css">
<div id="page1" data-role="page" data-theme="a">
<div data-role="header">
<h1>page1</h1>
</div>
<div data-role="content">
<a href="#page2" data-role="button"> go to page2</a>
<a href="#" data-role="button" onclick="test()"> go to page2 (script)</a>
</div>
</div>
<div id="page2" data-role="page" data-theme="b">
<div data-role="header">
<h1>page2</h1>
<a href="#page1" data-role="button" data-direction="reverse" data-icon="back">back</a>
</div>
<div data-role="content"></div>
</div>
JavaScript
function test() {
$(':mobile-pagecontainer').pagecontainer('change', '#page2');
}