Don't ask me why, but this only worked for me until I used double quotes ->"<- for all strings involved in this instruction:
$("#secondaryTitle").selectmenu("refresh", true);//working
I had it like this:
$('#secondaryTitle').selectmenu('refresh', true);//not working
and it not worked :S :S :S