1var temp = "myValue";
2
3// Create New Option.
4var newOption = $('<option>');
5newOption.attr('value', temp).text(temp);
6
7// Append that to the DropDownList.
8$('#dptcentres_edit').append(newOption);
9
10// Select the Option.
11$("#dptcentres_edit > [value=" + temp + "]").attr("selected", "true");