Do this if a checkbox is ticked, do this on uncheck
<p>I am having a bit of trouble with ticking/unticking checkboxes.</p>

<p>I am currently using jquery vs 1.4</p>

<p>The Problem:</p>

<p>I have a list of checkboxes who's id's are generated by a PHP loop.</p>

<p>i.e</p>

<ul>
<li>tickbox 1 id = checkthis_1</li>
<li>tickbox 2 id = checkthis_2</li>
<li>tickbox 3 id = checkthis_3</li>
<li>and so on</li>
</ul>

<p>When I check a tickbox I want to get the id of that checkbox (1, 2 or 3) and add that to a hidden field. When that same tickbox is unticked I want to remove its id from the hidden field.</p>

<p>i.e</p>

<p>I tick checkbox 3, the number 3 goes into my hidden field. When I untick checkbox 3, the number 3 is removed from the hidden field.</p>

<p>Can anyone help please?</p>

<p>Thanks in advance</p>
