jQuery+easy+UI+APIWord格式.docx
《jQuery+easy+UI+APIWord格式.docx》由会员分享,可在线阅读,更多相关《jQuery+easy+UI+APIWord格式.docx(38页珍藏版)》请在冰豆网上搜索。
).tabs(options);
Toaddatabpanel:
).tabs('
add'
{
title:
'
NewTab'
content:
TabBody'
closable:
true
});
Dependencies
none
Options
TabsContainer
Overridedefaultswith$.fn.tabs.defaults.
Properties
Name
Type
Description
Default
width
number
Thewidthoftabscontainer.
auto
height
Theheightoftabscontainer.
idSeed
Thebaseidseedtogeneratetabpanel'
sDOMidattribute.
plain
boolean
Truetorenderthetabstripwithoutabackgroundcontainerimage.
false
fit
Truetosetthesizeoftabscontainertofitit'
sparentcontainer.
border
Truetoshowtabscontainerborder.
scrollIncrement
Thenumberofpixelstoscrolleachtimeatabscrollbuttonispressed.
100
scrollDuration
Thenumberofmillisecondsthateachscrollanimationshouldlast.
400
Events
Parameters
onLoad
arguments
Fireswhenanajaxtabpanelfinishloadingremotedata.argumentsissameasthecallbackfuntionsuccessofjQuery.ajax.
onSelect
title
Fireswhenuserselectatabpanel.
onClose
Fireswhenusercloseatabpanel.
Methods
Parameter
resize
Resizethetabscontaineranddolayout.
add
options
Addanewtabpanel,theoptionsparameterisaconfigobject,seetabpanelpropertiesformoredetails.
close
Closeatabpanel,titleparameterindicatewhichpaneltobeclosed.
select
Selectatabpanel.
exists
Indicateifthespecialpanelisexists.
TabPanel
id
string
ThetabpanelDOMidattribute.
null
Thetabpaneltitletext.
content
Thetabpanelcontent.
href
AURLtoloadremotecontenttofillthetabpanel.
cache
Truetocachethetabpanel,validwhenhrefpropertyissetted.
icon
AniconCSSclasstoshowontabpaneltitle.
closable
Whensettotrue,thetabpanelwillshowaclosablebuttonwhichcanclicktoclosethetabpanel.
selected
Whensettotrue,tabtabpanelwillbeselected.
Thewidthoftabpanel.
Theheightoftabpanel.
UsageDraggable
dd"
100px;
border:
1pxsolid#ccc;
title"
background:
#ccc;
title<
#dd'
).draggable(options);
Overridedefaultswith$.fn.draggable.defaults.
handle
selector
Thehandlethatstartthedraggable.
disabled
Truetostopdraggable.
edge
Thedragwidthinwhichcanstartdraggable.
axis
Definestheaxiswhichthedraggedelementsmoveson,availablevalueis'
v'
or'
h'
whensettonullwillmoveacross'
and'
direction.
onStartDrag
e
Fireswhenthetargetobjectstartdragging.
onDrag
Firesduringdragging.Returnfalsewillnotdodraggingactually.
onStopDrag
Fireswhenthedraggingstops.
Resizable
UsageResizable
rr"
#rr'
).resizable(options);
Overridedefaultswith$.fn.resizable.defaults.
Truetodisableresizing.
handles
Indicatethedirectionofresizable,'
n'
isthenorth,'
e'
istheeast,etc.
n,e,s,w,ne,se,sw,nw,all
minWidth
Theminimumwidthwhenresizing.
10
minHeight
Theminimumheightwhenresizing.
maxWidth
Themaximumwidthwhenresizing.
10000
maxHeight
Themaximumheightwhenresizing.
Theedgeofbordertoberesized.
5
onStartResize
Fireswhenstartresizing.
onResize
Firesduringresizing.Whenreturnfalse,theDOMelementwillnotactsactualresizeaction.
onStopResize
Firestwhenstopresizing.
Panel
UsagePanel
Manypanelpropertiescanbedefinedin<
div/>
markup.
p"
title="
MyPanel"
collapsible="
10px;
PanelContent
Tocreateapanel
#p'
).panel(options);
Tocreateapanelwithcustomtools
).panel({
'
MyPanel'
tools:
[{
iconCls:
icon-new'
handler:
function(){alert('
new'
)}
},{
icon-save'
save'
}]
Tomovepaneltootherposition
).panel('
move'
left:
100,
top:
Overridedefaultswith$.fn.panel.defaults.
Thetitletexttodisplayinpanelheader.
iconCls
ACSSclasstodisplaya16x16iconinpanel.
Setthepanelwidth.
Setthepanelheight.
left
Setthepanelleftposition.
top
Setthepaneltopposition.
cls
AddaCSSclasstothepanel.
headerCls
AddaCSSclasstothepanelheader.
bodyCls
AddaCSSclasstothepanelbody.
style
object
Addacustomspecificationstyletothepanel.
{}
Whentruetosetthepanelsizefitit'
Definesiftoshowpanelborder.
doSize
Ifsettotrue,thepanelwillberesizeanddolayoutwhencreated.
collapsible
Definesiftoshowcollapsiblebutton.
minimizable
Definesiftoshowminimizablebutton.
maximizable
Definesiftoshowmaximizablebutton.
Definesiftoshowclosablebutton.
tools
array
Customtools,everytoolcancontaintwoproperties:
iconClsandhandler
[]
collapsed
Definesifthepaneliscollapsedatinitialization.
minimized
Definesifthepanelisminimizedatinitialization.
maximized
Definesifthepanelismaximizedatinitialization.
closed
Definesifthepanelisclosedatinitialization.
AURLtoloadremotedataandthendisplayinthepanel.
loadingMessage
Whenloadingremotedatashowamessageinthepanel.
Loading…
Fireswhenremotedataisloaded.
onBeforeOpen
Firesbeforepanelisopened.
onOpen
Firesafterpanelisopened.
onBeforeClose
Firesbeforepanelisclosed.
Firesafterpanelisclosed.
onBeforeDestroy
Firesbeforepanelisdestroyed.
onDestroy
Firesafterpanelisdestroyed.
onBeforeCollpase
Firesbeforepaneliscollapsed.
onCollapse
Firesafterpaneliscollpased.
onBeforeExpand
Firesbeforepanelisexpanded.
onExpand
Firesafterpanelisexpanded.
width,height
Firesafterpanelisresized.
thenewouterwidth
thenewouterheight
onMove
left,top
Firesafterpanelismoved.
left:
thenewleftpostion
top:
thenewtopposition
onMaximize
Firesafterthewindowhasbeenmaximized.
onRestore
Firesafterthewindowhasbeenrestoredtoitsoriginalsize.
onMinimize
Firesafterthewindowhasbeenminimized.
Returnoptionsproperty.
panel
Returnthepanelobject.
header
Returnthepanelheaderobject.
body
Returnthepanelbodyobject.
setTitle
Setthetitletextofheader.
open
forceOpen
WhenforceOpenparametersettotrue,thepanelisopenedbypasstheonBeforeOpencallback.
forceClose
WhenforceCloseparametersettotrue,thepanelisclosedbypasstheonBeforeClosecallback.
destroy
forceDestroy
WhenforceDestroyparametersettotrue,thepanelisdestroyedbypasstheonBeforeDestroycallback.
refresh
Refreshthepaneltoloadremotedatawhenhrefpropertyissetted.
Setpanelsizeanddolayout.Theoptionsobjectcontainsfollowingproperties:
thenewpanelwidth
thenewpanelheight
thenewpanelleftposition
thenewpaneltopposition
move
Movethepaneltoanewposition.Theoptionsobjectcontainsfollowingproperties:
Accordion
UsageAccordion
aa"
300px;
200px;
Title1"
icon-save"
h3style="
color:
#0099FF;
AccordionforjQuery<
/h3>
p>
AccordionisapartofeasyuiframeworkforjQuery.Itletsyoudefineyouraccordioncomponentonwebpagemoreeasily.<
/p>
Title2"
selected="
content2
Title3"
content3
#aa'
).accordion(options);
∙panel
ContainerOptions
Thewidthofaccordioncontainer.
Theheightofaccordioncontainer.
Settotruetosettheaccordioncontainersizefitit'
Definesiftoshowtheborder.
PanelOptions
Theaccordionpanelo