我有一個嵌套按鈕,並試圖添加點擊事件,但它似乎沒有工作。jquery mobile在嵌套按鈕上添加單擊事件
這是我的目的是使用
$("#ui-50 .ui-rpC#rpc-eor").click(function(){
alert("yay!");
});
但該事件不會火
<div id="ui-50">
<div class="ui-rpc" data-role="controlgroup" data-type="horizontal" >
<input type="button" id="rpc-bor" value="<<" />
<input type="button" id="rpc-back" value="<" />
<span style="margin:3px"></span>
<input type="text" id="rpc-jump" value="" />
<input type="button" id="rpc-next" value=">" />
<input type="button" id="rpc-eor" value=">>" />
<span style="margin:20px"></span>
<label id="rpc-current" >0</label>
<label id="rpc-separator" >/</label>
<label id="rpc-total" >0</label>
<span style="margin:20px"></span>
<label id="rpc-rpp" >0</label>
</div>
</div>
我嘗試在ID = 「RPC-EOR」 按鈕添加click事件。有什麼事?請幫忙!在此先感謝
哪個jQuery.mobile的版本,您使用的是ID? – andyb