$(コンポーネント指定).button('enable');
$(コンポーネント指定).button('disable');
$(コンポーネント指定).textinput('enable');
$(コンポーネント指定).textinput('disable');
$(コンポーネント指定).slider('enable');
$(コンポーネント指定).slider('disable');
$(コンポーネント指定).slider('refresh');
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>Sample</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> <script type="text/javascript"> $('#home').live('pagecreate',function(){ $('#btn').bind('tap',doAction); $('#slider').bind('change',doAction2); }); function doAction(){ $('#slider').attr('value',0); $('#slider').slider('refresh'); $('#btn').button('disable'); $('#btn').button('refresh'); } function doAction2(){ $('#btn').button('enable'); $('#btn').button('refresh'); } </script> </head> <body> <!-- home page --> <div id="home" data-role="page"> <div data-role="header"> <h1>Hello</h1> </div> <div data-role="content"> <p>※サンプル。</p> <div data-role="fieldcontain"> <label for="slider"Slider:</label> <input type="range" name="slider" id="slider" value="0" min="0" max="100" /> </div> <div data-role="fieldcontain"> <input type="button" name="btn" id="btn" value="click" /> </div> </div> </div> </body> </html>
<< 前へ | 次へ >> |