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

metronic/jquery uniform使用中checkbox渲染问题

2016-04-27 10:03 423 查看
设定checkbox选中状态后,需要手工刷新

    function chooseAll() {

        if ($("#chkAll").checked) {

            $("input[name='itemIds']").each(function() {

                $(this).prop('checked',true);

            });

        } else {

            $('input[name="itemIds"]').each(function() {

                $(this).prop('checked',false);

            });

        }

        var set = $(this).attr("data-set");

        var checked = $(this).is(":checked");

        $(set).each(function () {

            if (checked) {

                $(this).attr("checked", true);

            } else {

                $(this).attr("checked", false);

            }

        });

        $.uniform.update(set);

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