data-role="none"
属性は、jQueryモバイル自動初期化とCSS拡張を防止します。
てみてくださいこれにあなたのボタンのコードを変更するには:
<button data-role="none" class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored mdl-js-ripple-effect">
<i class="material-icons">add</i>
</button>
代わりにあなたがtrueに$.mobile.ignoreContentEnabled
セットで親要素にdata-enhance="false"
データ属性を使用することができます。
またdemoesページで、 "フォーム要素の自動初期化の防止" を参照してください:http://demos.jquerymobile.com/1.4.5/forms/
EDIT#1
あなたはこのようなignoreContentEnabled
を設定することができます。
$(document).on('mobileinit', function() {
$.mobile.ignoreContentEnabled = true;
});
そして、このように要素属性としてdata-enhancing = "false"を追加してください:
<button data-enhance="false" data-role="none" class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored mdl-js-ripple-effect">
<i class="material-icons">add</i>
</button>
EDIT#2
MDLボタンはまた、アンカータグを使用して作成することができます:
ここMDLボタンについて
<a href="#pagethree" data-role="none" class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored mdl-js-ripple-effect">
<i class="material-icons">add</i>
</a>
より:http://webdesign.tutsplus.com/tutorials/learning-material-design-lite-buttons--cms-24593
ブラウザに余分な負担(余分なCSSやJS)を追加し、データ役割を追加する必要がないので、あなたは、スニペットの上に試してみてください= "none"をボタンに付けると、jQuery Mobileはそれを強化しません。 – ezanker
"none"を追加すると、ページはFABボタンをタップするとリンクされません。その外観(FAB)も以前と同じです。 –
なぜdata-role = "button"のdiv内のリンク内にボタンがありますか? – ezanker