您的位置:首页 > Web前端 > JQuery

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;

        });

    });

});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: