Search and Top Navigation
#2838 closed enhancement (worksforme)
Opened May 10, 2008 01:43PM UTC
Closed August 26, 2008 11:11AM UTC
Last modified October 11, 2012 09:15PM UTC
There should be a method to remove all the tabs from ui.tabs
Reported by: | sjmittal | Owned by: | klaus.hartl |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | ui.tabs | Version: | 1.5 |
Keywords: | ui.tabs | Cc: | |
Blocked by: | Blocking: |
Description
Hi,
There is a need to remove all the tabs from ui.tabs without destroying the tabs.
The function name should be removeAll
This is the code I propose:
removeAll: function() {
var len = this.length();
for(var index = 0; index < len; index++) {
var $li = this.$lis.eq(index).remove(), $panel = this.$panels.eq(index).remove();
}
this.tabify();
}
If found appropriate please include it in the code.
Thanks
Sachin
Attachments (0)
Change History (8)
Changed May 11, 2008 08:34PM UTC by comment:1
owner: | paul → klaus |
---|
Changed May 24, 2008 03:39AM UTC by comment:2
milestone: | 1.2.4 |
---|
Milestone 1.2.4 deleted
Changed May 24, 2008 04:27PM UTC by comment:3
component: | ui.core → ui.tabs |
---|---|
version: | 1.2.3 → 1.5b4 |
Changed May 24, 2008 09:59PM UTC by comment:4
owner: | klaus → klaus.hartl |
---|---|
status: | new → assigned |
Changed June 11, 2008 02:21AM UTC by comment:5
priority: | major → minor |
---|---|
version: | 1.5b4 → 1.5 |
Changed August 17, 2008 10:24AM UTC by comment:6
milestone: | → TDB |
---|
Changed August 26, 2008 11:11AM UTC by comment:7
resolution: | → worksforme |
---|---|
status: | assigned → closed |
I'd rather suggest to pass an array instead of a single index to the remove method. Same for disable/enable. I thought about adding this functionality the other day, but I'm not quite sure about making the API more difficult.
Apart from that, as jQuery itself, Tabs are easily extensible and thus I don't see the need to add this function to the core.
$.extend($.ui.tabs.prototype, { removeAll: function() { ... } });
Changed October 11, 2012 09:15PM UTC by comment:8
milestone: | TBD |
---|
Milestone TBD deleted