JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
    <head>     
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
</head>
<body>

<div data-role="page" id="home"><div data-role="content">    
    <a href="#foo">Next  Page</a>
</div></div>
<div data-role="page" id="foo"><div data-role="content">    
    <a href="#home">Go Back</a>
</div></div>

<script>
$(document).ready(function() {

    $("div[data-role='page']").bind("pagebeforehide", function( e, data ) {
       alert('pagebeforehide fired');
 });
    
});
</script>

</body>
</html>