jquery mobile的确是個好東西,新推出的BEATA版,更能适應更多的浏覽器了,下面是
小結下相關的TIPS,部分是收集的:
1) 顯示和隐藏BACK這個預設按鈕
$(document).bind("mobileinit", function () { $.mobile.page.prototype.options.addBackBtn = true;
});
2) 修改back button的文字
$(document).bind("mobileinit", function () {$.mobile.page.prototype.options.backBtnText = "previous";});
3)在代碼中動态隐藏dialog中的close按鈕
$('[data-role=dialog]div[id="YourDiaogdivID"]').live('pagecreate', function (event) {
$("a[data-icon='delete']").hide();
});
4) 重新整理一個checkbox
$("select#foo").parent().contents().children('.ui-btn-text').text('Your Text Here');
5) 顯示或隐藏日期器
$(".ui-datepicker").hide();
$(".ui-datepicker").show();
6)