jQuery实现radio的单选,和取消单选
2016-07-08 14:53
471 查看
requirejs(['../config'], function () {
require(['jquery'], function ($) {
$('.product-container').on('click', '.radio-inline', function(event) {
$(this).find('.radio').prop('checked', !$(this).find('.radio').prop('checked'));
return false;
});
$('.product-container').find('.radio-inline .radio').mousedown(function(event) {
$(this).prop('checked', !$(this).prop('checked'));
}).click(function(event) {
return false;
});
});
});
require(['jquery'], function ($) {
$('.product-container').on('click', '.radio-inline', function(event) {
$(this).find('.radio').prop('checked', !$(this).find('.radio').prop('checked'));
return false;
});
$('.product-container').find('.radio-inline .radio').mousedown(function(event) {
$(this).prop('checked', !$(this).prop('checked'));
}).click(function(event) {
return false;
});
});
});
相关文章推荐
- 用jQuery跟原生js实现选项卡效果
- jQuery 遍历函数
- 在JQuery中,写了function但是调不到的解决方法
- JQuery中each()的使用方法说明
- jquery自定义插件开发总结
- jQuery选择器总结
- 用JQuery实现Ajax的简单小应用
- jquery remove(),detach(),empty()
- jquery 复制节点clone(),clone(true)
- jquery 替换节点 replaceWith(), 和replaceAll( )
- jquery里的$("#") 与$("#"+xx)
- jquery 包裹节点warp(),warpAll(),warpInner()
- jquery学习笔记1
- jquery表单防重复提交
- jquery遍历节点 children(),next(),prev(),siblings()closest()
- Jquery判断复选框 input type = checkbox 全部选中 ;全部不选中;其中不选中 则 全部就不能被选中;
- jQuery.makeArray() 函数详解
- jQuery源代码自我理解(二)
- Jquery的parent和parents(找到某一特定的祖先元素)
- dataTables插件-基本初始化