I want some text to change color when the user checks a checkbox
<p>When the user ticks the checkbox next to some text, I want the text to change color.</p>

<p>This is the code I have:</p>

<pre><code>&lt;p style="color: #FF0000; font-weight: bold;"&gt;
   I have read and agree to the terms and conditions
   &lt;input type="checkbox" id="termsChkbx" /&gt;
&lt;/p&gt;
</code></pre>

<p>This is the function I have so far:</p>

<pre><code>function hasTickedBox( checkBoxID) {
   var chkbx = document.getElementById( checkBoxID );
   if ( chkbx.checked ) {
      //change the font color 
   } else {
      //do nothing 
   }
}
</code></pre>
