An example for the handler, assuming it is being attached to the
anchors:
function(e) {
var index = $('#your-tabs ul.ui-tabs-nav a').index(this);
$('#your-tabs').tabs('remove', index);
}
--Klaus
On 24 Mrz., 16:21, Elmo Peele <[email protected]> wrote:
> Is there a way, given a tab name/href/identifier/object to retrieve
> the tabs internal index (required for remove(), enable(), disable()
> and load())?
>
> I have an event handler whose purpose is to remove the tab to which it
> is attached. Unfortunately, I can't find a way to locate the index of
> the tab, particularly in the face of the possibility that preceding
> tabs MAY have already been deleted, modifying the creation-time index.
>
> The one workaround I've found it to extend ui.tabs with a second
> getter that can convert the tab name/href/identifier/object to a tab
> index (as is already done throughout the internals). This doesn't
> seem like the best solution given that I'm sure others have already
> solved this.
>
> Note that I'm currently working with version 1.5.1 but hope to soon
> migrate to 1.7.1.
>
> Any thoughts / assistance??
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---