JavaScript: Change select - the last option to become the first option

From The Travis van der Font Wiki
Jump to: navigation, search
jQuery
$('#select_id option').last().prependTo('#select_id');
$('#select_id')[0].selectedIndex = 0;