I'm trying to set the default selection in a select menu in JQuery mobile. The docs have this:
var myselect = $("select#foo");
myselect[0].selectedIndex = 3;
myselect.selectmenu("refresh");
Which I added right underneath where I create the menu, but then when I run the code I get this error:
throw "cannot call methods on " + name + " prior to initialization; " + "attempted to call method '" + options + "'";
Not sure what to do at this point...