If I understand correctly what you're asking, would a simple if statement (using OR operators to select 1, 3, or 5) and then using jQuery's .addClass do the trick?
http://docs.jquery.com/Attributes/addClass#class complete speculation, but you may also be interested in: http://docs.jquery.com/Selectors/odd Hope that helps, Simon On Aug 3, 12:26 pm, shaded <dar...@eztransition.com> wrote: > Ok lets say i have a multiple select list > > <select id=mylist name=mylist[]> > <option id=1>first</option> > <option id=2>second</option> > <option id=3>third</option> > <option id=4>fourth</option> > <option id=5>fifth</option> > </select> > > then i have a string of id's that i want to set to selected like so. > > var selectedIds = '1,3,5'; > > is it possible to use jquery (preferably in a one liner) to set first, > third and fifth to selected.?