Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HTMLコードが
<input class="test1 10" type="checkbox" name="custom_tags_checkbox[]">
クラスを使用してチェックボックスをオフにしたいのですが、何らかの理由で id を使用したくありません。
hasClassで試していますが、機能しません。ここで私が試したことは何ですか?
jQuery('.test1').hasClass('10').attr('checked',false);
$('.test1.10').prop('checked', false);
これを試して..
$(document).ready(function() { $(".test1 10").click(function() { $(this).attr('checked', false); }); });