[jQuery] Selecting option:first on dynamic menu list

[jQuery] Selecting option:first on dynamic menu list


I just wanted to share, I had this problem :
in FF it would select the last <option>
in IE, the first.
With a dynamic loaded Menu, you need to put
the .attr("selected","selected") in a function after the load is
successful:
$("#user_list").load("getUserList.php",function(){
        $("#user_list option:first").attr("selected","selected");
}):
WORKS LIKE A CHARM NOW!