Change the Text of a Option with jQuery
$("#mySelect option").html(function(i,str){
return str.replace(/Newest|Oldest/g, // here give words to replace
function(m,n){
return (m == "Newest")?"Oldest":"Newest"; // here give replacement words
});
});
demo : http://jsfiddle.net/diode/eSa5p/2/
Change text of the selected option:
$("#select").find("option:selected").text('Newest');
$('select option:contains("Newest")').each(function(){
var $this = $(this);
$this.text($this.text().replace("Newest","Oldest"));
});
http://jsfiddle.net/eSa5p/
EDIT: Answer to the new question:
var $newest = $('select option:contains("Newest")');
$('select option:contains("Oldest")').text('Newest');
$newest.text('Oldest');
http://jsfiddle.net/eSa5p/3/
You should start a new question but here's the answer:
$('select option:contains("Newest")').text('TEMPEST');
$('select option:contains("Oldest")').text('Newest');
$('select option:contains("TEMPEST")').text('Oldest');