0
jQuery Mobileでswiperightを探して、リストをハイライト表示し、その中の隠しチェックボックスをチェックします。私は再びswiperightをすると、その行動を逆転させます。ここでは、私がこれまでに収集されたものです:jQueryモバイルスワイプliで隠しチェックボックスをチェック
HTML:
<ul data-role="listview">
<li><a href="#resultPage">Deals<input type="checkbox"/></a></li>
</ul>
CSS:
input[type="checkbox"]
{
display:none;
}
のjQuery:
$(document).ready(function() {
//Swipe
$("#searchPage li").live('swiperight', function(){
if($(this).children(':input:checkbox').is(':checked')){
$(this).css('background','orange');
$(this).children(':input:checkbox').click();
}else{
$(this).css('background', '');
$(this).children(':input:checkbox').click();
}
}
});//END ready
これは今すぐうまくいきます! –