戻るボタン
jQuery Mobile 1.3.0
- 旧バージョンで次ページ以降に自動生成された「戻る」ボタンが、自動生成されません
- 自動生成するには、以下の2つの方法があります
JavaScriptで記述する場合
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" /> <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script> $(document).bind("mobileinit", function() { $.mobile.page.prototype.options.addBackBtn = true; }); </script> <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
date-role に追加する場合
- 直接ページが表示された場合など戻るページがない場合にボタンは表示されません
<div data-role="page" id="next" data-add-back-btn="true">