jQuery选项卡wdScrollTab 博客分类: jQuery jQuery选项卡wdScrollTab
实例Demo
参数说明
Config
active
Number Active tab index. Base on 0.
autoResizable
Boolean Whether panel resizes itself according to content.
border
Boolean To show border or not.
height
String Initialization height.
- //heigh config
- height :'200px'// or '100%'.
heightResizable
Booean Whether end user can change panel height by mouse dragging.
items
Array Tab items array.
renderTo
String or JQuery object To specify where tab panel will be placed. It could be a DOM id or jquery object.
width
String Initialization width.
- // width config, in px or percentage.
- width :'200px'// or '100%'.
widthResizable
Boolean Whether end user can change panel width by mouse dragging.
Method
addTab(item)
To add a new tab.
Object | item | Object for item profile. |
- //to add a new tab
- addTab({id:"newtabid",
- title:"I am new",
- html:"some new message goes here",
- closable:true,
- disabled:false,
- icon:"image/new.gif"
- });
getActiveIndex()
To get index of active tab.
Return Number - index of active tab.
getActiveTab()
To get active tab.
Return Object - Profile of active tab.
getClosable(id)
To determine whether tab is closable or not.
String | id | item id. |
getContent(id)
To get tab inner html.
String | id | item id. |
getDisable(id)
To determine whether tab is disabled or not.
String | id | item id. |
getTabPosision(id)
To get tab index.
Return Number - index of tab.
String | id | item id. |
getTabsCount()
To get how many tabs are in the panel.
Return Number - Number of tabs .
getTitle(id)
To get tab title.
String | id | item id. |
kill(id)
To close tab.
String | id | item id. |
refresh(id)
To refresh tab content.
String | id | item id. |
setClosable(id, True)
To enable or disable end user to close tab.
String | id | Item id. |
Booleaan | True | for closable, false for not. |
setContent(id, title)
To set tab title.
String | id | Item id. |
String | title | Tab inner html. |
setDisable(id, True)
To enable or disable tab.
String | id | Item id. |
Booleaan | True | for disabled, false for enabled. |
setRenderWH(wh)
To set width and height of the panel.
Object | wh | width and height. |
- //To set tab height and width
- setRenderWH({width:'200px', height:'400px'});
setTitle(id, title)
To set tab title.
String | id | Item id. |
String | title | Tab title. |
上一篇: 环境搭建 博客分类: Java SE A
推荐阅读
-
jQuery选项卡wdScrollTab 博客分类: jQuery jQuery选项卡wdScrollTab
-
JQuery函数:each(callback) 博客分类: JQuery
-
Jquery获取select标签的值、文本方式 博客分类: jquery jqueryhtmlselect文本value
-
jquery 最简单有效的底部浮动层,可随屏幕滚动始终居下。 博客分类: jquery
-
详解Jquery的各ajax函数:$.get,$.post,$.ajax,$getJSON 博客分类: jquery ajaxjquery
-
正则表达式学习 博客分类: jquery 正则表达式
-
jquery-控制div的显示与隐藏 博客分类: web前端jQuery div显示隐藏jQuery
-
jQuery实现页面锚点滚动效果 博客分类: jQuery jQuery锚点回到顶部js
-
jQuery 可编辑的表格 博客分类: javascript jQuery可编辑表格
-
jQuery循环表格,并统计匹配度 博客分类: jQuery jQuery乔乐共享统计匹配度表格