JSFiddle - React, Tailwind, and code Playground
by WebSerGe
HTML
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b3/jquery.mobile-1.0b3.min.css">
<div data-role="page" id="home">
<div data-role="content">
<a href="#page2" data-role="button" id="buttonPage">Page2</a>
</div>
</div>
<div data-role="page" id="page2">
<div data-role="content">
</div>
</div>
JavaScript
$("#page2").on("pageshow", function onPageShow(e,data){
alert(localStorage.getItem("localId"));
alert("2");
});
$('#buttonPage').click(function(e) {
alert("1");
localStorage.setItem("localId", 111);
});