If you're able to do that, why not have the server just put the attribute in the HTML in the first place?
<input type="checkbox" value="1" id="12" name="12" checked="checked" /> -Mike > From: hubbs > > I figured it out, I just had my server write the jQuery attributes: > > $("#12").attr("checked", "checked"); > > On Aug 22, 11:58 am, hubbs <[EMAIL PROTECTED]> wrote: > > There is also the option of me putting the checked values into an > > array if that would help with this... > > > > On Aug 22, 11:27 am, hubbs <[EMAIL PROTECTED]> wrote: > > > > > I am looking for ideas on how to check some checkboxes based on a > > > list of id's that match the id's of the checkboxes. > > > > > Example: > > > > > <div id="checkedValues"> > > > 10, 14, 11 > > > </div> > > > > > <div id="checkBoxes"> > > > <input type="checkbox" value="1" id="10" name="10" /> <input > > > type="checkbox" value="1" id="11" name="11" /> <input > > > type="checkbox" value="1" id="12" name="12" /> <input > > > type="checkbox" value="1" id="13" name="13" /> <input > > > type="checkbox" value="1" id="14" name="14" /> </div> > > > > > In this example, when the page loads, I need the checkboxes with > > > id's 10, 14, and 11 to be checked, and the rest to remain > unchecked. > > > The values in checkedValues come from the server, so I need to > > > mirror these with a checked value if that id comes up within the > > > checkedValues div. > > > > > I know there must be an easy, or better way to do this, > just looking > > > for ideas. Thanks! >