metronic/jquery uniform使用中checkbox渲染問題

設定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);

    }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章