checklist: set checked via prop instead of attr

This commit is contained in:
vitalets 2013-01-13 13:53:46 +04:00
parent e1b3dbfc53
commit 0881baeed6
2 changed files with 7 additions and 2 deletions

@ -2,6 +2,11 @@ X-editable changelog
=============================
Version 1.4.1 wip
----------------------------
[enh] checklist: set checked via prop instead of attr (vitalets)
Version 1.4.0 Jan 11, 2013
----------------------------
[enh] added new input type: combodate (vitalets)

@ -72,7 +72,7 @@ $(function(){
//set checked on required checkboxes
value2input: function(value) {
this.$input.removeAttr('checked');
this.$input.prop('checked', false);
if($.isArray(value) && value.length) {
this.$input.each(function(i, el) {
var $el = $(el);
@ -81,7 +81,7 @@ $(function(){
/*jslint eqeq: true*/
if($el.val() == val) {
/*jslint eqeq: false*/
$el.attr('checked', 'checked');
$el.prop('checked', true);
}
});
});