jQuery Select Individual Checkbox in Group
<p>I'm trying to simply select one individual checkbox in a group of boxes and can't figure it out.</p>

<p>Here is the code that creates my checkbox group dynamically. I need to be able to loop through and select individual boxes that were checked previously by the user:</p>

<pre><code>&lt;?php
    //Display all "cheese" options in a checkbox group
    foreach($_SESSION['ingr_cheese'] as $key =&gt; $value)
    {
        echo "&lt;div class=\"cheesebox\" style=\"float:left; width:175px; margin-bottom:7px;\"&gt;";
        echo "&lt;input type=\"checkbox\" name=\"cheese1\" class=\"cheeseCheck\" value=\"".$key."\"&gt;&amp;nbsp;&lt;label for=\"cheese1\"&gt;".$value['cheese']."&lt;/label&gt;&lt;/br&gt;";
        echo "&lt;/div&gt;";
    }
?&gt;
</code></pre>

<p>Once I figure out how to check just one I can figure out the loop. Here is the jQuery code I'm trying to select just the checkbox with index value "1":</p>

<pre><code>$("#cheese1:checkbox:eq('1')").attr("selected", true);
</code></pre>
