basic jQuery function not responding
<p>I would like my jQuery function to turn check the attribute of the checkbox and if checked make a text with the id ="activate_post_checkbox_text" black. otherwise i would like the text to be grey. </p>

<p>jQuery</p>

<pre><code>function checkedDark () {
    if($("#activate_post_checkbox").attr("checked")) {
            $("#activate_post_checkbox_text").style.color = "#000";
    } else {
            $("#activate_post_checkbox_text").style.color = "#666";
    }

}
</code></pre>

<p>HTML</p>

<pre><code>&lt;li class="activate_post_checkbox"&gt;
&lt;input type="checkbox" id="activate_post_checkbox" value="active" onClick="valueChange();" /&gt;&lt;span id="activate_post_checkbox_text"&gt;Make my posting active immediately.&lt;/span&gt;
&lt;/li&gt;
</code></pre>

<p>this is how it looks right now in my script type="text/javascript" area on the top of my page.</p>

<pre><code>function checkedDark () {

$('#activate_post_checkbox')
.click(valueChange)
.click(function(){

  $("#activate_post_checkbox_text").css('color', this.checked ? '#000' : '#666');

});


}
</code></pre>
