easyui validatebox的两个方法.移除验证和还原验证

$.extend($.fn.validatebox.methods, {
    remove: function (jq, newposition) {
        return jq.each(function () {
            $(this).removeClass("validatebox-text validatebox-invalid").unbind('focus').unbind('blur');
        });
    },

    reduce: function (jq, newposition) {
        return jq.each(function () {
            var opt = $(this).data().validatebox.options;
            $(this).addClass("validatebox-text").validatebox(opt);
        });
    }
}); 

用法:

$('#id').validatebox('remove'); 
$('#id').validatebox('reduce');
原文地址:https://www.cnblogs.com/gengaixue/p/2595765.html