Take the 2-minute tour ×  I have a Multi Select List generated
by HTML.ListBoxFor. The select element has an id of '#listBox'
I want to add a title attribute to each option tag. The value of
the title attribute comes from a Dictionary<string,string>.  I
want to do the following  loop through option element of the
selectlist and get the text of the option element  loop through
each element of Dictionary  Where dictionary.key == text add a
title attribute with the value of Dictionary.Value.
share|improve this question I haven't done jQuery for ages, so
i'm pretty much stuck at the first hurdle, of even looping
through the option elements of the selectlist –  Doozer1979 Jul
11 '12 at 13:55 $('#yourSelect option').each(function(){..do
stuff..}); –  sirrocco Jul 11 '12 at 14:00 @Doozer1979 You will
not be able to do that, since you can't loop on your server-side
type after you get text client-side with Jquery,since client-
side only works after page is rendered. Is there some other way
you can get those values fr