JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css">
<div data-role="page" id="home">
<div data-role="content">
<p>
<ul data-role="listview" data-inset="true" data-theme="c">
<li id="listitem0">Swipe Right to view Page 1</li>
<li id="listitem1">Swipe Right to view Page 2</li>
</ul>
</p>
</div>
</div>
<div data-role="page" id="page1">
<div data-role="content">
<ul data-role="listview" data-inset="true" data-theme="c">
<li data-role="list-divider">Navigation</li>
<li><a href="#home">Back to the Home Page</a></li>
</ul>
<p>
Yeah!<br />You Swiped Right to view Page 1
</p>
</div>
</div>
JavaScript
/*
$("#listitem0").swiperight(function() {
$.mobile.changePage("#page1");
console.log(1);
});
$("#listitem1").swiperight(function() {
$.mobile.changePage("#page1");
console.log(2);
});
*/
for (var x=0; x<2; x++ ) {
$("#listitem"+x).bind("vclick",function(e)
{ console.log("clicked"+x); });
console.log(x);
}