Skip to content
Related Articles

Related Articles

Improve Article
How to hide the checkbox based on value in jQuery ?
  • Last Updated : 06 Nov, 2020

The checkbox are used to set the content according to the user which he wants to see at the interface. User also can set the multiple choices according to his wish.


$('input[name=foo]').attr('checked', false);

In the above syntax, it returns the value of the checked or unchecked checkbox being assigned to the table box which the user selects. If the user want to see the particular content in the table box, then the user can select the checkbox associated with the column textbox which he wants.

Example: Below example illustrates the approach. It returns the value of the checkbox assigned to the table box or column using a function click(). Whenever the checkbox is checked or unchecked, it assigns the respective return value into the table box.


<!DOCTYPE html>
            How to Show/Hide checkbox based 
            on value using jQuery
        <hr />
        <input type="checkbox" name="Course">Geeks_course
        <input type="checkbox" name="student"> Geeks_Student
        <input type="checkbox" name="Tutorial">Geeks_Tutorial
        <hr />
        <script src=
                    false).click(function () {
                var shcolumn = "." + $(this).attr("name");
    <table border="1">
            <th class="Course">Course_name</th>
            <th class="student">project</th>
            <th class="Tutorial">Geeks_Course</th>
                <td class="Course">C++</td>
                <td class="student">face_recognition</td>
                <td class="Tutorial">Web-development</td>
                <td class="Course">Java</td>
                <td class="student">Handwritten_Recognition</td>
                <td class="Tutorial">Placement-Series</td>
                <td class="Course">C programming</td>
                <td class="student">To-Do list</td>
                <td class="Tutorial">Java course</td>
                <td class="Course">Python</td>
                <td class="student">Chat-Bot</td>
                <td class="Tutorial">Java-Api's</td>
                <td class="Course">JavaScript</td>
                <td class="student">Weather-prediction</td>
                <td class="Tutorial">Fork-Java</td>


My Personal Notes arrow_drop_up
Recommended Articles
Page :