[jQuery] Re: :eq() expects number problem

2008-03-03 Thread Jeffrey Kretz
The reason why this didn't work: $('#courses optgroup:eq("+choosenValue+") option'); Is that you are mixing single quotes and double quotes. $('#courses optgroup:eq('+choosenValue+') option'); Would work, if choosenValue is a variable that has the value of 3. JK -Original Message- F

[jQuery] Re: :eq() expects number problem

2008-03-03 Thread Klaus Hartl
On Mar 3, 5:34 pm, mjpg <[EMAIL PROTECTED]> wrote: > DO NOT SEEM TO WORK: > > $('#courses optgroup:eq("+choosenValue+") option');     // and I don't > understand this anyhow No need for shouting. Seems like you messed up double and single quotes. Try: $('#courses optgroup:eq(' + choosenValue + '