문제

I can't select an option in a select box with a specific value. This is the code I am using:

$('#group_e option[value="'+parameters.group+'"]').attr("selected", "selected");

I did console.log() the parameters.group value so I know it is equal to the option I am trying to select.

I am doing this in an XCODE emulator using Phonegap and jQuery Mobile.

도움이 되었습니까?

해결책

You need to refresh the select to reflect the changes after changing value:

 $('#group_e').selectmenu('refresh', true);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top