SO 38823238

by Dig

HTML

<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
  <div class="form-group">
          <div class="col-md-2 col-md-offset-3">
              <input type="checkbox" name="change" id="change"  value="0" > Change All Countries 


        </div>
    </div>
  <table class="table table-striped" id="tablecountry">
        <thead>
                <tr>
                    <th>Country</th>
                    <th>Monday</th>
                    <th>Tuesday</th>
                    <th>Wednesday</th>
                    <th>Thursday</th>
                    <th>Friday</th>
                    <th>Saturday</th>
                    <th>Sunday</th>

                </tr>
            </thead>
            <tbody>
            <tr class="row2">
              <td>Content</td>
            </tr>
             <tr type="hidden" id="rowhidden" class="rowhidden">
                    <td >Hello</td>
                </tr>
            </table>
            </tbody>
</table>

JavaScript

$("#change").change(function(){

            $("#tablecountry tr.row2").toggle(!this.checked);
            $("#tablecountry tr.rowhidden").toggle(this.checked);
        });
$("#change").change();