title: Checking a var is checked
body: <p>In my case my checkboxes are not ticked by default so when the checkbox var <code>html</code> is ticked I would like it to show the alert.  </p>
  
  <p>Is there anyway that this can be done via a variable/use of <code>#id</code> or do I have to do something along the lines of <code>($('.checkbox_check').is(':checked'))</code>?</p>
  
  <p>I am just trying not to bloat my code if possible.   </p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;E-mail Sig Generator&lt;/title&gt;
        &lt;link href=
  "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
  rel="stylesheet"&gt;
  &lt;link href=
  "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"
  rel="stylesheet"&gt;
  &lt;script src=
  "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
  $(document).ready(function() {
  
          var name     = $('#name').val();
          var position = $('#position').val();
          var phone    = $('#phone').val();
          var email    = $('#email').val();
          var address  = $('#address').val();
          var facebook = $('#facebook').val();
          var website  = $('#website').val();
          var html     = $('#showInline');
          var file     = $('#html');
  
          if(html)
          {
              alert("muppets");
  
          }
      });
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body style="background:#000;"&gt;
      &lt;div style="width:980px; margin-left:auto; margin-right:auto;"&gt;
          &lt;table border="0" cellpadding="0" cellspacing="0" width="980px"&gt;
              &lt;tr&gt;
                  &lt;td style="text-align:center; background:#000;"&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  
      &lt;div style=
      "width:980px;margin-left:auto;margin-right:auto;border-radius:25px;background-color: #ffffff;"&gt;
      &lt;form class="form-group" id="email" method="post" name="email" style=
      "width:380px; padding:20px;"&gt;
              &lt;div class="form-group"&gt;
                  &lt;label for="name"&gt;Name&lt;/label&gt; &lt;input class="form-control" id=
                  "name" type="text"&gt;
              &lt;/div&gt;
  
              &lt;div class="form-group"&gt;
                  &lt;label for="position"&gt;Position&lt;/label&gt; &lt;input class=
                  "form-control" id="position" type="text"&gt;
              &lt;/div&gt;
  
              &lt;div class="form-group"&gt;
                  &lt;label for="phone"&gt;Phone&lt;/label&gt; &lt;input class="form-control"
                  id="phone" type="tel"&gt;
              &lt;/div&gt;
  
              &lt;div class="form-group"&gt;
                  &lt;label for="email"&gt;E-Mail&lt;/label&gt; &lt;input class="form-control"
                  id="email" type="email"&gt;
              &lt;/div&gt;
  
              &lt;div class="form-group"&gt;
                  &lt;label for="address"&gt;Address&lt;/label&gt; &lt;input class=
                  "form-control" id="address" type="text"&gt;
              &lt;/div&gt;
  
              &lt;div class="form-group"&gt;
                  &lt;label for="facebook"&gt;Facebook&lt;/label&gt; &lt;input class=
                  "form-control" id="facebook" type="text"&gt;
              &lt;/div&gt;
  
              &lt;div class="form-group"&gt;
                  &lt;label for="website"&gt;Website&lt;/label&gt; &lt;input class=
                  "form-control" id="website" type="text"&gt;
              &lt;/div&gt;
  
              &lt;div class="form-group"&gt;
                  &lt;div class="checkbox"&gt;
                      &lt;label&gt;&lt;input id="html" type="checkbox" value=""&gt;
                      &lt;strong&gt;Download as a HTML file&lt;/strong&gt;&lt;/label&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class="form-group"&gt;
                  &lt;label&gt;&lt;input id="showInline" type="checkbox" value=""&gt;
                  &lt;strong&gt;Show as HTML Code&lt;/strong&gt;&lt;/label&gt;
              &lt;/div&gt;
          &lt;/form&gt;
  
          &lt;div id="inlineDIV" onchange="showInlineDIV()" style="display:none;"&gt;
              &lt;textarea id="showInlineHTML" readonly="readonly"&gt;
  &lt;/textarea&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>