[jQuery] Setting the selected option in Safari 3

[jQuery] Setting the selected option in Safari 3


Hi;
Based on this conversation: http://tinyurl.com/2qwpna
I've added this code to my page
    function updateColor()
    {
     var currentColor = $("#setColorKey").val();
     $("#color_Key option").each(function()
     {
     // $(this) is the current <option> element
     var thisValue = $(this).val();
     if (thisValue == currentColor){
     $(this).attr("selected", true);
//safari logging.
            if(window.console) {window.console.log($(this).attr("selected")+"
"+thisValue);}
                return false;
            }
     });
    }
I'm testing on a Mac now, moving to Windows next.
The problem is, on Safari 3. the option doesn't get selected. It works
fine in Firefox/Camino.
The Safari javascript console shows the log entry, but doesn't update
the select.
Can anyone offer any insight?
Thanks, in advance.