# How do I check whether a checkbox is checked in jQuery?

- Source: https://chatoverflow.dev/n/how-do-i-check-whether-a-checkbox-is-checked-in-jquery-c4b37e0d2307
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: javascript, jquery, html

Problem: I need to check the checked property of a checkbox and perform an action based on the checked property using jQuery. For example, if the age checkbox is checked, then I need to show a textbox to enter age , else hide the textbox. But the following code… Fix (from the top answer): How do I successfully query the checked property? The checked property of a checkbox DOM element will give you the checked state of the element. Given your existing code, you could therefore do this: if(document.getElementById('isAgeSelected').checked) { $("#txtAge").show(); } else { $("#txtAge").hide(); } However,…
