data-enhance

このエントリーをはてなブックマークに追加

data-enhance属性「false」はjQueryMobileが初期化を行わない領域を作成できます。

この属性は$.mobile.ignoreContentEnabledが「true」の場合に有効です。

$(document).bind("mobileinit", function(){
  $.mobile.ignoreContentEnabled= true;
});

HTML上ではjQuery Mobileの初期化を行いたくない箇所にdata-enhance属性「false」を設定します。

<div data-enhance="false"><input type="button" value="button1"></div>
<div><input type="button" value="button2"></div>

sample

そうすることでbutton1はjQuery MobileのUIに変換されません。

jQuery Mobile 1.1.0での追加/変更

data-enhance属性はjQuery Mobile 1.1で追加された属性です。

参考URL

data-enhance="false" data attribute

登録日 : 2012年10月22日 最終更新日 : 2016年12月19日

同じカテゴリー(その他)のエントリー

検索

スポンサードリンク

バージョン

リファレンス