私は動的に生成されたリストビューを持っています。各リスト要素には、カスタム データ属性を割り当てます。listitem がクリックされると、ポップアップが呼び出されます。
<a href="#popupMenu" data-name='.$myrow[id].' data-rel="popup">View</a>
//mypopup
<ul data-role="listview" data-inset="true" data-theme="b">
<li data-role="divider" data-theme="a">Options</li>
<li><a id="one" onclick="func1();" href="#">Function one</a></li>
<li><a id="two" href="#">Remove</a></li>
<li><a id="three" href="#">Cancel</a></li>
</ul>
ポップアップを呼び出したリストビュー項目のカスタム データ属性を取得する正しい方法を知りたいです。
//myjavascipt
var func1 = function() {
//display the custom data attribute from the listview click here
alert();
};
ありがとう。