I want to set the selected value of a jQuery Mobile flipswitch:
<select id="quote" data-role="flipswitch" data-theme="b">
<option value="nee">Nee</option>
<option value="ja">Ja</option>
</select>
When doing the following I get an error:
$("#quote").val('nee').flipswitch('refresh');
"cannot call methods on flipswitch prior to initialization"
I have also tried:
$("#quote").val('nee').slider().flipswitch('refresh');
$("#quote").val('nee').flipswitch().flipswitch('refresh');
How can I get this right?