I cant really guess where u missing.But check this js fiddle where i used your code and its working absolutely fine for me .
$("select[name = unit]").change(function()
{
var selected = $("option:selected", this).text().trim();
if(selected == "Metric (cm)")
{
$("label[for = unit]").text("mm");
}
else if(selected == "Imperial (inches)")
{
$("label[for = unit]").text("inches");
} });
I updated the jsfiddle for you .You needed to add this trim at the end like this :
var selected = $("option:selected", this).text().trim();
and you set to go.
Here is updated jsfiddle :