Trigger a jQuery event with a checkbox - and pass the value?
<p>Apologies what what is probably a poor title for this question - I struggled to come up with anything better!</p>

<p>I'm working on a simple 'to do' list as part of a wider application, and have hit a stumbling block with my limited jQuery/Javascript knowledge.</p>

<p>The page features a number of checkboxes - one alongside each 'task'.  What I need to do is fire off a 'get' event each time a checkbox is checked or unchecked (the 'get' will fire a backend script that saves the status - i.e checked will save it as 'done', whereas unchecking it will save it as 'pending').</p>

<p>I've got so far as to fire back an alert when the user interacts with the checkboxes, and have now got the alert to display the value (which is a simple ID of the task) of the checkbox, but I'm stuck on how I get all of this together to trigger the .get</p>

<p>Here's what I have so far...</p>

<pre><code>&lt;script&gt;
$(document).ready(function(){
$(":checkbox").change(function(){
    if($(this).attr("checked"))
    {
        alert($(this).is(':checked'))
    }
    else
    {
        alert($(this).val());
    }
});
});
&lt;/script&gt;

&lt;input type="checkbox" value="#itemID#"&gt;
</code></pre>

<p>Pointers much appreciated!</p>
