$.mobile.button.prototype.options.corners = false;先に述べたように、プッシュボタンの設定は$.mobile.button.prototype.optionsにまとめられています。ここではその中のcorndersとthemeというプロパティに値を設定しています。それぞれに値を設定しているだけで、ウィジェットを生成するなどの処理はまったくありません。そのあたりはjQuery Mobileが行なってくれるのですから。
$.mobile.button.prototype.options.theme = "e";
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
<!DOCTYPE html> <html> <head> <title>My Page</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <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" > $(document).bind("mobileinit", function(){ $.mobile.button.prototype.options.corners = false; $.mobile.button.prototype.options.theme = "e"; }); </script> <script type="text/javascript" src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> </head> <body> <!-- home page --> <div id="home" data-role="page"> <div data-role="header"> <h1>Sample</h1> </div> <div data-role="content"> <p id="msg">サンプル</p> <div>これはサンプルのページです。</div> <a href="#" data-role="button">link</a> <input type="button" value="button"> <hr> </div> </div> </body> </html>
<< 前へ | 次へ >> |