禁用Jquery复选框单击多选下拉菜单
问题描述:
答
您可以return false
的复选框单击事件。这将停止事件冒泡(stopPropogation()
)并阻止默认操作(preventDefault()
)用于点击事件,如发回服务器。
$(document).ready(function(){
$('input:checkbox[name*=multiselect_]').click(function(){
return false;
});
});
答
如果您可以提供标记,那么这将使您的问题更清楚。但是如果在复选框上有一个点击事件,那么你应该做的就是防止它。
$('checkbox').on('click',function(e){
//prevent the event
e.preventDefault();
});
我在哪里可以做,在jquery.ui.min.js文件 –
没有别碰那个文件... instaed为此在脚本文件 –
http://www.erichynds.com/examples/jquery -ui-multiselect-widget/demos /正在使用的是 –