Skip to main content

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:


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();




If found appropriate please include it in the code.



Attachments (0)
Change History (8)

Changed May 11, 2008 08:34PM UTC by flesler comment:1

owner: paulklaus

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 paul comment:3

component: ui.coreui.tabs

Changed May 24, 2008 09:59PM UTC by paul comment:4

owner: klausklaus.hartl
status: newassigned

Changed June 11, 2008 02:21AM UTC by klaus.hartl comment:5

priority: majorminor
version: 1.5b41.5

Changed August 17, 2008 10:24AM UTC by Cloudream comment:6

milestone: → TDB

Changed August 26, 2008 11:11AM UTC by klaus.hartl comment:7

resolution: → worksforme
status: assignedclosed

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 scottgonzalez comment:8

milestone: TBD

Milestone TBD deleted