title: Checking all Data Value in Table
body: <p>My code is as follows:</p>
  
  <pre><code>&lt;div class="input-group select-all" &gt;
      &lt;span class="input-group-addon disabled"&gt;
          &lt;input type="checkbox" &lt;?php if($pagetitle=="Trash") echo "disabled"?&gt;&gt;
              &lt;/span&gt;
                  &lt;div class="input-group-btn"&gt;
                      &lt;button type="button" class="btn btn-default dropdown-toggle &lt;?php if($pagetitle=="Trash") echo "disabled"?&gt;" data-toggle="dropdown" tabindex="-1"&gt;
                          &lt;span class="caret"&gt;&lt;/span&gt;
                          &lt;span class="sr-only"&gt;Toggle Dropdown&lt;/span&gt;
                      &lt;/button&gt;
                      &lt;ul class="dropdown-menu" role="menu"&gt;
                          &lt;li&gt;&lt;a href="#"&gt;Delete&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/div&gt;
              &lt;/div&gt;&lt;!-- /input-group --&gt;
  </code></pre>
  
  <p>When we checked in checkbox then all the data in a table must be selected, which is the type of operation I need.</p>
  
  <pre><code>&lt;div class="mails"&gt;
              &lt;table class="table table-hover table-condensed"&gt;
                  &lt;?php
                  if(count($inMessages)&gt;0)
                      foreach($inMessages as $m):
                          ?&gt;
                          &lt;tr data-id="&lt;?php echo $m-&gt;sn?&gt;" &lt;?php if($m-&gt;flag==1) echo "class=\"read\""?&gt;&lt;?php if($m-&gt;flag==0) echo "class=\"unread\""?&gt;&gt;
                              &lt;td&gt;&lt;?php if($pagetitle!="Trash"):?&gt;&lt;i class="fa fa-check-square-o fa-square-o disabled" data-id="&lt;?php echo $m-&gt;sn?&gt;"&gt;&lt;/i&gt;&lt;?php endif?&gt;&lt;/td&gt;
                              &lt;td class="subject"&gt;&lt;?php echo $m-&gt;subject?&gt;&lt;/td&gt;
                              &lt;td class="body"&gt;&lt;?php echo $m-&gt;message?&gt;&lt;/td&gt;
                              &lt;td&gt;
                                  &lt;?php echo $m-&gt;address?&gt;
                                  &lt;BR/&gt;&lt;?php echo $m-&gt;io?&gt;
                              &lt;/td&gt;
                              &lt;td class="time"&gt;&lt;?php echo $m-&gt;mdate?&gt; &lt;?php echo $m-&gt;mtime?&gt;&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;?php
                      endforeach
                  ?&gt;
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/div&gt;&lt;!-- /Right Side mail bar --&gt;
  </code></pre>
  
  <p>Manual check box works properly, but I need check all options.</p>
  
  <p>How can I do that in addition to the code above? Please help me.</p>