, .
ListView
click <a> , .
$('#mylist a').bind('click', function(event){
});
, , .
data-customattr .
.
<a href="#popupBasic" data-rel="popup" data-customattr="value2" >Basic Popup 2</a>
data-customattr click,
$(this).data('customattr')
, <p> . -
<p id="mypopup">This is a completely basic popup, no options set.</p>
, .
, -
$('#mylist a').bind('click', function(event){
console.log($(this).text());
$('#mypopup').html($(this).data('customattr'));
});
live fiddle http://jsfiddle.net/gFTzt/5/
,
<a href="#popupBasic" data-rel="popup" id="mybutton" data-role="button" data-customattr="button value">button example</a>
, click customattr.
$('#mybutton').bind('click',function(){
alert($(this).data('customattr'));
});
live fiddle http://jsfiddle.net/gFTzt/5/
.attr()
data, . , .
. , .
<a href="#popupBasic" customattr="value1">Basic Popup 1</a>
value1, .attr(), .
$(this).attr('customattr')
.