Jquery mobile Jquery Mobile 1.2多复选框选择问题
我正在编写一个基于jQueryMobile 1.2、jQuery1.8.2、css和HTML5的应用程序,允许用户选择多个图像并执行命令 如果我不使用jquery.mobile-1.2.0.min.js库,以下功能可以正常工作: CSS代码:Jquery mobile Jquery Mobile 1.2多复选框选择问题,jquery-mobile,Jquery Mobile,我正在编写一个基于jQueryMobile 1.2、jQuery1.8.2、css和HTML5的应用程序,允许用户选择多个图像并执行命令 如果我不使用jquery.mobile-1.2.0.min.js库,以下功能可以正常工作: CSS代码: .image-checkbox-container input[type="checkbox"]{ display: none; } .image-checkbox-container img{ border: 0; margin
.image-checkbox-container input[type="checkbox"]{
display: none;
}
.image-checkbox-container img{
border: 0;
margin: 4px;
}
HTML:
一旦我将jquery.mobile-1.2.0.min.js库添加到代码中,它就不能正常工作了。取消选中/取消选中复选框不起作用
我试图使用checkboxradio(“刷新”),但没有任何运气
如有任何建议,将不胜感激
谢谢使用CSS解决方案怎么样?
另外添加此自定义CSS:
.checked {
border : 4px solid #38A!important;
margin : 0px!important;
}
并使用以下脚本:
<script>
$('.image-checkbox-container img').live('click', function(){
$this=$(this);
if($this.hasClass('checked')===true){
$this.removeClass('checked');
}else{
$this.addClass('checked');
}
});
</script>
$('.image checkbox container img').live('click',function(){
$this=$(this);
if($this.hasClass('checked')==true){
$this.removeClass('checked');
}否则{
$this.addClass('checked');
}
});
.checked {
border : 4px solid #38A!important;
margin : 0px!important;
}
<script>
$('.image-checkbox-container img').live('click', function(){
$this=$(this);
if($this.hasClass('checked')===true){
$this.removeClass('checked');
}else{
$this.addClass('checked');
}
});
</script>