#2838 closed enhancement (worksforme)
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
Change History (8)
comment:1 Changed 15 years ago by
Owner: | changed from paul to klaus |
---|
comment:2 Changed 15 years ago by
Milestone: | 1.2.4 |
---|
comment:3 Changed 15 years ago by
Component: | ui.core → ui.tabs |
---|---|
Version: | 1.2.3 → 1.5b4 |
comment:4 Changed 15 years ago by
Owner: | changed from klaus to klaus.hartl |
---|---|
Status: | new → assigned |
comment:5 Changed 15 years ago by
Priority: | major → minor |
---|---|
Version: | 1.5b4 → 1.5 |
comment:6 Changed 15 years ago by
Milestone: | → TDB |
---|
comment:7 Changed 15 years ago by
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() { ... } });
Milestone 1.2.4 deleted