공부/J쿼리

[Jquery] 체크박스 체크가 안될때(attr VS prop)

나무사이 2014. 11. 27. 16:46

분명히..

$("input.month_check").attr("checked", true);

처럼 했을때.. 동작 했었다..

그런데.. 체크 된걸 지우고 다시 누르면.. 체크가 되지 않는다..-_-;;;;


검색해보니..

prop 라는게 있더라..

그래서 $("input.month_check").prop('checked',true); 바꾸니 잘된다..^^;;


정보 얻은 링크는

http://javascriptandjquerydev.blogspot.kr/2012/07/attr-prop.html