Use the Tabs' remove method:
http://docs.jquery.com/UI/Tabs/tabs#.22remove.22index

$('#one').tabs('remove', 0); // close first tab

To close all tabs at once, you could try:

for (var i = $('#tabs').tabs('length') - 1; i >= 0; i--) {
    $('#tabs').tabs('remove', i);
}

Propably better to cache the tab interface in a variable when
initializing...:

var $tabs = $('#tabs').tabs();

for (var i = $tabs.tabs('length') - 1; i >= 0; i--) {
    $tabs.tabs('remove', i);
}

Ultimately you may want to extend the tabs with a removeAll method
(untested):

$.extend($.ui.tabs.prototype, {
    removeAll: function() {
        for (var i = this.$tabs.length - 1; i >= 0; i--) {
            this.remove(i);
        }
    }
});

Usage: $('#one, #two, #three').tabs('removeAll');


--Klaus






On Sep 17, 1:06 pm, nukem <[EMAIL PROTECTED]> wrote:
> I am using jquer tabs.
>
> I have 3 different tabs (three uls) I want to close them
> programatically.
> How do i do that?
>
> Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to