I got a small but annoying problem (still jquery 1.0.4 (old site))
Note the following code:
$("li#coffee_morning").click(function(){
        var people = $("#people").attr("value");
        $("select#s_morning option:eq(" + people + ")")[0].selected = true;
//      $("select#s_morning option:eq(" + people + ")").attr("selected",
"true");
        $("li#coffee_morning select").css({display: "block"});
});

The code looks at a select and want to make other select automaticaly
change the value.
With the following this works:  $("select#s_morning option:eq(" + people
+ ")")[0].selected = true;

however then you can't change the setting of the select#s_morning

if I use the attr $("select#s_morning option:eq(" + people +
")").attr("selected", "true");

Then the selected will show up in the html code but won't show in the
browser that this is the selected item.

How can I solve this problem

Thanxs 


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to