JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0-beta.1/jquery.mobile-1.2.0-beta.1.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0-beta.1/jquery.mobile-1.2.0-beta.1.min.css">
<div data-role="page" id="one">
    <header data-role="header">
        <ul>
            <li><a href="#one">one</a></li>
            <li><a href="#two">two</a></li>
            <li><a href="#next">next</a></li>
        </ul>
    </header>
    <article data-role="content">one</article>
</div>
<div data-role="page" id="two">
    <header data-role="header">
        <ul>
            <li><a href="#one">one</a></li>
            <li><a href="#two">two</a></li>
            <li><a href="#next">next</a></li>
        </ul>
    </header>
    <article data-role="content">two</article>
</div>
<div data-role="page" id="next">
    <header data-role="header">
        <ul>
            <li><a href="#one">one</a></li>
            <li><a href="#two">two</a></li>
            <li><a href="#next">next</a></li>
        </ul>
    </header>
    <article data-role="content">next</article>
</div>

JavaScript

$(document).live('pagebeforeshow', function() {
    alert($.mobile.activePage.attr('id'));
});