jQuery layout 外掛屬性
相信很多人在用layout的時候都會找layout到底有多少屬性可以配置,都能控制什麼,網上可以隨意找到一些屬性的意思,但有時這些屬性並不滿足,這時候可以去看原始碼,Layout原始碼中已經告訴你屬性的作用,如下:
1.網上找的:
2.原始碼帶的:
1.網上找的:
$(function(){
var myLayout =$("body").layout(
{
applyDefaultStyles: true,//應用預設樣式
scrollToBookmarkOnLoad:false,//頁載入時滾動到標籤
showOverflowOnHover:false,//滑鼠移過顯示被隱藏的,只在禁用滾動條時用。
north__closable:false,//可以被關閉
north__resizable:false,//可以改變大小
north__size:50,//pane的大小
spacing_open:8,//邊框的間隙
spacing_closed:60,//關閉時邊框的間隙
resizerTip:"可調整大小",//滑鼠移到邊框時,提示語
//resizerCursor:"resize-p" 滑鼠移上的指標樣式
resizerDragOpacity:0.9,//調整大小邊框移動時的透明度
maskIframesOnResize:"#ifa",//在改變大小的時候,標記iframe(未通過測試)
sliderTip:"顯示/隱藏側邊欄",//在某個Pane隱藏後,當滑鼠移到邊框上顯示的提示語。
sliderCursor:"pointer",//在某個Pane隱藏後,當滑鼠移到邊框上時的指標樣式。
slideTrigger_open:"dblclick",//在某個Pane隱藏後,滑鼠觸發其顯示的事件。(click", "dblclick", "mouseover)
slideTrigger_close:"click",//在某個Pane隱藏後,滑鼠觸發其關閉的事件。("click", "mouseout")
togglerTip_open:"關閉",//pane開啟時,當滑鼠移動到邊框上按鈕上,顯示的提示語
togglerTip_closed:"開啟",//pane關閉時,當滑鼠移動到邊框上按鈕上,顯示的提示語
togglerLength_open:100,//pane開啟時,邊框按鈕的長度
togglerLength_closed:200,//pane關閉時,邊框按鈕的長度
hideTogglerOnSlide:true,//在邊框上隱藏開啟/關閉按鈕(測試未通過)
togglerAlign_open:"left",//pane開啟時,邊框按鈕顯示的位置
togglerAlign_closed:"right",//pane關閉時,邊框按鈕顯示的位置
togglerContent_open:"<div style='background:red'>AAA</div>",//pane開啟時,邊框按鈕中需要顯示的內容可以是符號"<"等。需要加入預設css樣式.ui-layout-toggler .content
togglerContent_closed:"<img/>",//pane關閉時,同上。
enableCursorHotkey:true,//啟用快捷鍵CTRL或shift + 上下左右。
customHotkeyModifier:"shift",//自定義快捷鍵控制鍵("CTRL", "SHIFT", "CTRL+SHIFT"),不能使用alt
south__customHotkey:"shift+0",//自定義快捷鍵(測試未通過)
fxName:"drop",//開啟關閉的動畫效果
fxSpeed:"slow",//動畫速度
//fxSettings: { duration: 500, easing: "bounceInOut" }//自定義動畫設定(未通過測試)
//initClosed:true,//初始時,所有pane關閉
//initHidden:true //初始時,所有pane隱藏
onresize :ons,//調整大小時呼叫的函式
onshow_start:start,
onshow_end:end
/*
其他回撥函式
顯示時呼叫
onshow = ""
onshow_start = ""
onshow_end = ""
隱藏時呼叫
onhide = ""
onhide_start = ""
onhide_end = ""
開啟時呼叫
onopen = ""
onopen_start = ""
onopen_end = ""
關閉時呼叫
onclose = ""
onclose_start = ""
onclose_end = ""
改變大小時呼叫
onresize = ""
onresize_start = ""
onresize_end = ""
*/
}
);
2.原始碼帶的:
var options = {
name: "" // FUTURE REFERENCE - not used right now
, scrollToBookmarkOnLoad: true // after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark)
, defaults: { // default options for 'all panes' - will be overridden by 'per-pane settings'
applyDefaultStyles: false // apply basic styles directly to resizers & buttons? If not, then stylesheet must handle it
, closable: true // pane can open & close
, resizable: true // when open, pane can be resized
, slidable: true // when closed, pane can 'slide' open over other panes - closes on mouse-out
//, paneSelector: [ ] // MUST be pane-specific!
, contentSelector: defaults.contentSelector // INNER div/element to auto-size so only it scrolls, not the entire pane!
, contentIgnoreSelector: defaults.contentIgnoreSelector // elem(s) to 'ignore' when measuring 'content'
, paneClass: defaults.paneClass // border-Pane - default: 'ui-layout-pane'
, resizerClass: defaults.resizerClass // Resizer Bar - default: 'ui-layout-resizer'
, togglerClass: defaults.togglerClass // Toggler Button - default: 'ui-layout-toggler'
, buttonClass: defaults.buttonClass // CUSTOM Buttons - default: 'ui-layout-button-toggle/-open/-close/-pin'
, resizerDragOpacity: 1 // option for ui.draggable
//, resizerCursor: "" // MUST be pane-specific - cursor when over resizer-bar
, maskIframesOnResize: true // true = all iframes OR = iframe-selector(s) - adds masking-div during resizing/dragging
//, size: 100 // inital size of pane - defaults are set 'per pane'
, minSize: 0 // when manually resizing a pane
, maxSize: 0 // ditto, 0 = no limit
, spacing_open: 6 // space between pane and adjacent panes - when pane is 'open'
, spacing_closed: 6 // ditto - when pane is 'closed'
, togglerLength_open: 50 // Length = WIDTH of toggler button on north/south edges - HEIGHT on east/west edges
, togglerLength_closed: 50 // 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden'
, togglerAlign_open: "center" // top/left, bottom/right, center, OR...
, togglerAlign_closed: "center" // 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right
, togglerTip_open: "Close" // Toggler tool-tip (title)
, togglerTip_closed: "Open" // ditto
, resizerTip: "Resize" // Resizer tool-tip (title)
, sliderTip: "Slide Open" // resizer-bar triggers 'sliding' when pane is closed
, sliderCursor: "pointer" // cursor when resizer-bar will trigger 'sliding'
, slideTrigger_open: "click" // click, dblclick, mouseover
, slideTrigger_close: "mouseout" // click, mouseout
, hideTogglerOnSlide: false // when pane is slid-open, should the toggler show?
, togglerContent_open: "" // text or HTML to put INSIDE the toggler
, togglerContent_closed: "" // ditto
, showOverflowOnHover: false // will bind allowOverflow() utility to pane.onMouseOver
, enableCursorHotkey: true // enabled 'cursor' hotkeys
//, customHotkey: "" // MUST be pane-specific - EITHER a charCode OR a character
, customHotkeyModifier: "SHIFT" // either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
// NOTE: fxSss_open & fxSss_close options (eg: fxName_open) are auto-generated if not passed
, fxName: "slide" // ('none' or blank), slide, drop, scale
, fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
, fxSettings: {} // can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
, initClosed: false // true = init pane as 'closed'
, initHidden: false // true = init pane as 'hidden' - no resizer or spacing
/* callback options do not have to be set - listed here for reference only
, onshow_start: "" // CALLBACK when pane STARTS to Show - BEFORE onopen/onhide_start
, onshow_end: "" // CALLBACK when pane ENDS being Shown - AFTER onopen/onhide_end
, onhide_start: "" // CALLBACK when pane STARTS to Close - BEFORE onclose_start
, onhide_end: "" // CALLBACK when pane ENDS being Closed - AFTER onclose_end
, onopen_start: "" // CALLBACK when pane STARTS to Open
, onopen_end: "" // CALLBACK when pane ENDS being Opened
, onclose_start: "" // CALLBACK when pane STARTS to Close
, onclose_end: "" // CALLBACK when pane ENDS being Closed
, onresize_start: "" // CALLBACK when pane STARTS to be ***MANUALLY*** Resized
, onresize_end: "" // CALLBACK when pane ENDS being Resized ***FOR ANY REASON***
*/
}
, north: {
paneSelector: "."+prefix+"north" // default = .ui-layout-north
, size: "auto"
, resizerCursor: "n-resize"
}
, south: {
paneSelector: "."+prefix+"south" // default = .ui-layout-south
, size: "auto"
, resizerCursor: "s-resize"
}
, east: {
paneSelector: "."+prefix+"east" // default = .ui-layout-east
, size: 200
, resizerCursor: "e-resize"
}
, west: {
paneSelector: "."+prefix+"west" // default = .ui-layout-west
, size: 200
, resizerCursor: "w-resize"
}
, center: {
paneSelector: "."+prefix+"center" // default = .ui-layout-center
}
};
相關文章
- [譯] HTML5 data 屬性規則使用 jQuery Validate 外掛HTMLjQuery
- jQuery 屬性jQuery
- jquery Mobiscroll日期時間選擇外掛使用 以及設定defaultValue屬性不起作用jQuery
- JQuery模板外掛-jquery.tmpljQuery
- PropertyChanged.Fody自動通知屬性外掛
- jQuery的外掛列表jQuery
- JQuery蜂巢圖外掛jQuery
- jQuery設定disabled屬性與移除disabled屬性jQuery
- jQuery外掛擴充套件jQuery套件
- jQuery擴充套件外掛jQuery套件
- vscode vetur外掛取消元件屬性強制換行VSCode元件
- jQuery外掛--表格隔行變色jQuery
- jquery複習之路---常用外掛jQuery
- 手寫jquery.cookie外掛jQueryCookie
- 下拉控制元件jQuery外掛控制元件jQuery
- CSS外觀屬性CSS
- SOLIDWORKS外掛SolidKits高階BOM之批次寫入模型屬性Solid模型
- jQuery固定側邊欄外掛ssMenujQuerySSM
- 非常全面的jquery 外掛網站jQuery網站
- jquery寫的ajax分頁外掛jQuery
- jQuery - 獲取內容和屬性jQuery
- jQuery - 設定內容和屬性jQuery
- jQuery屬性操作之.val()函式jQuery函式
- css文字外觀屬性CSS
- jQuery燈箱外掛lightBox使用方法jQuery
- 建議把datetimePicker改成jquery的外掛jQuery
- cookie外掛-jquery.cookie.js介紹CookiejQueryJS
- (JavaScript學習記錄):jQuery 屬性操作JavaScriptjQuery
- jQuery中判斷input的disabled屬性jQuery
- jQuery事件物件event的屬性和方法jQuery事件物件
- jquery 操作HTML data全域性屬性快取的坑jQueryHTML快取
- [外掛擴充套件]jQuery二維碼外掛0.2【更新瀏覽器相容】套件jQuery瀏覽器
- 手把手教你開發jquery外掛(二)jQuery
- 手把手教你開發jquery外掛(三)jQuery
- jQuery中的工具與外掛個人分享jQuery
- CSDN專屬idea外掛上線啦~~Idea
- jQuery新增到購物車動畫特效外掛jQuery動畫特效
- Jquery外掛Nicescroll 製作漂亮的滾動條jQuery
- 深入理解jQuery外掛開發總結(三)jQuery