用法:
initSelector
類型:Selector
默認:
See below
導航欄小部件的默認 initSelector
是:
":jqmData(role='navbar')"
注意:此選項在 1.4.0 中已棄用,並將在 1.5.0 中刪除。
從 jQuery Mobile 1.4.0 開始,initSelector
不再是小部件選項。相反,它直接在小部件原型上聲明。因此,您可以通過處理mobileinit
事件並覆蓋initSelector
在原型上:
$( document ).on( "mobileinit", function() {
$.mobile.navbar.prototype.initSelector = "div.custom";
});
注意: 請記住在加載 jQuery 之後、加載 jQuery Mobile 之前附加 mobileinit
處理程序,因為該事件是作為 jQuery Mobile 加載過程的一部分觸發的。
此選項的值是一個 jQuery 選擇器字符串。框架根據此選項的值選擇元素,並在每個生成的元素列表上實例化導航欄小部件。
(不推薦使用的版本:1.4.0)相關用法
- JQuery Mobile Navbar iconpos用法及代碼示例
- JQuery Mobile Navbar classes用法及代碼示例
- JQuery Mobile Navbar create()用法及代碼示例
- JQuery Mobile Navbar defaults用法及代碼示例
- JQuery Mobile Navbar disabled用法及代碼示例
- JQuery Next Siblings Selector (“prev ~ siblings”)用法及代碼示例
- JQuery Next Adjacent Selector (“prev + next”)用法及代碼示例
- JQuery Mobile Popup initSelector用法及代碼示例
- JQuery Mobile Collapsibleset disabled用法及代碼示例
- JQuery UI Datepicker prevText用法及代碼示例
- JQuery ajaxError()用法及代碼示例
- JQuery Mobile Selectmenu defaults用法及代碼示例
- JQuery UI Tabs event用法及代碼示例
- JQuery UI Selectable appendTo用法及代碼示例
- JQuery UI :focusable Selector用法及代碼示例
- JQuery UI Selectmenu disabled用法及代碼示例
- JQuery UI Button classes用法及代碼示例
- JQuery .jquery用法及代碼示例
- JQuery .scroll()用法及代碼示例
- JQuery UI Draggable snapMode用法及代碼示例
- JQuery each()用法及代碼示例
- JQuery Mobile Toolbar hide用法及代碼示例
- JQuery UI Tabs option用法及代碼示例
- JQuery UI Buttonset widget用法及代碼示例
- JQuery .add()用法及代碼示例
注:本文由純淨天空篩選整理自jquerymobile.com大神的英文原創作品 Navbar initSelector。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。