Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 445 Bytes

check_checkbox.md

File metadata and controls

13 lines (9 loc) · 445 Bytes

How to check if a checkbox is checked

var is_checked = $('input[type=checkbox]').is(':checked');
  • is_checked - this variable will contain true if selected checkbox if checked
  • $('input\[type=checkbox\]') - jQuery selector (box) for needed checkbox element
  • .is( - checks selected element with specified selector
  • :checked - selector for checked elements

link_youtube: https://youtu.be/JiEZ8Z6I5tY