Instead of $('#x[i]'), you need $('#'+x[i]) as this will concatenate the '#' with the value of x[i]
Rik 2008/11/6 Yessica <[EMAIL PROTECTED]>: > > I have an checkboxes in form and I have unique ID for each of them... > and something like this : > var x = new Array ( 'idx1','idx2' ); > and I need to do something like this: > for ( var i in x ) > { > $('#x[i]').attr('checked', true); --> this isn't working > } > > ....I do not have any idea how to change an array like some element.... -- Rik Lomas http://rikrikrik.com