jQuery Uniform Checkbox does not (un)check

后端 未结 8 1937
借酒劲吻你
借酒劲吻你 2020-12-14 00:15

I am using jQuery Uniform to style inputs/selects etcs. However, the checkbox has stopped working. I am appending data sent from an ajax call. Once it\'s loaded

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-14 01:03

    SIMPLE SOLUTION

    This is because UniformJs requires that you update your modification on uniform elements if you need to change values on the form dynamically:

    $('#checkbox').prop('checked',true);
    $.uniform.update();
    

    Edit

    If you wish to update the #checkbox only:

    $('#checkbox').prop('checked',true);
    $.uniform.update('#checkbox');
    

提交回复
热议问题