title: Javascript change of color with checkbox
body: <p>I have a javascript here which is able to change color when checkbox is checked, but it had to rely on use of external libraries for it to work. Would it be possible for it not use external libraries such as function () ?</p>
  
  <pre><code>&lt;p style="color: red; font-weight: bold;"&gt;I have read and agree to the terms and conditions
              &lt;input type="checkbox" id="termsChkbx" onchange="isChecked(this,'sub1')"/&gt;&lt;/p&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.11.1.min.js"&gt;&lt;/script&gt;
  $(document).ready(function(){
      $('#termsChkbx').change(function(){
          if($(this).is(':checked'))
          {
              $(this).parent('p').css('color','black');
          }
          else
          {
               $(this).parent('p').css('color','red');
          }
      });  
  </code></pre>