jqm 1.3.0 slider refresh not working
hello everyone,
yesterday i update jqm to 1.3.0, but I found that slider refresh does not work, my code:
the js excuted but ui not refreshed
- <button id="change-button" data-icon="add" data-theme="d"></button>
- <select name="weather-option" id="weather-switch" data-role="slider" data-mini="true">
- <option value="off" selected="selected">关闭</option>
- <option value="on">打开</option>
- </select>
- <script type="text/javascript">
- $("#change-button").on("click", function(event) {
- $('#weather-switch').find("option:selected").removeAttr("selected");
- $('#weather-switch>[value=on]').attr('selected', 'true');
- console.log("refresh");
- $('#weather-switch').trigger('create');
- });
- </script>