ベストアンサー
あなたのコードのいくつかの欠陥:
- should not be used. Instead, use self-closing tags
<input ... />
-
parents()
should beclosest()
. It is
possible thatparents()
select multiple elements -
Remove
.not(this)
, and add the following:if (this == _this) { tt.data('text',tt.val()); } else { tt.val(''); }
-
Replace the function at
blur()
by:if(ss.val(ss.data('text')).val().length > 0) ss.closest('tr').find('.humble').prop('checked', true)