代码改变世界

【待续】【JqueryMobile】Questions And Answers

2011-11-18 14:47  朱峰(Peter.zhu)  阅读(170)  评论(0编辑  收藏  举报

1. How to add items and refresh the select menu in JQuery mobile ?

 

To add items dynamically, you must first append the select options to the actual select box like you were trying. But then additionally you must run a refresh on the widget as well. 
For example I have done:
$("#selectbox").html(optionList).selectmenu('refresh', true);