テキストエリアへの設定 $('#comment_text').text(tokki.comment); NG 動いたり動かなかったりする $('#comment_text').val(tokki.comment); チェックボックスへの設定 $('#end_check').attr("checked", flg); NG 動いたり動かなかったりする $('#end_check').prop("checked", flg);
1.チェック時
attr → checked
prop → true
2.非チェック時
attr → undefined
prop → false