jquery mobile各类组件刷新方法
1、Combobox or select dropdowns var myselect = $("#sCountry");
myselect[0].selectedIndex = 3;
myselect.selectmenu('refresh');
or
$( ".selector" ).selectmenu( "refresh", true );
2、Listviews $('#mylist').listview('refresh');
3、Slider control $('#slider').val(80).slider('refresh');
4、Toggle switch var myswitch = $("#toggle");
myswitch[0].selectedIndex = 1;
myswitch .slider("refresh");
5、Radio buttons $("input[value=grid]").attr('checked',true).checkboxradio('refresh');
or
$( ".selector" ).prop( "checked", true ).checkboxradio( "refresh" );
6、Checkboxes $('#checkbox-1').attr('checked',true).checkboxradio('refresh');
or
$( ".selector" ).prop( "checked", true ).checkboxradio( "refresh" );
7、Buttons $( "[type='submit']" ).button( "refresh" );
or
$( ".selector" ).buttonMarkup( "refresh" );
8、Column-Toggle Table $( ".selector" ).table-columntoggle( "refresh" );
9、Reflow Table $( ".selector" ).table( "refresh" );
|