I just wanted to add a little more information. I changed the index to
the new way of: tabsEl.tabs("option", "selected"); and am still
getting the same results. I am using jQuery 1.3.2 and jQueryUI 1.7.
The tabs are also sortable, but the problem still exists when the tabs
are not made sortable. I am loading the tab content remotely and
noticed that I don't appear to have an issue as long as I select
another tab and then go back to the tab I am trying to delete before
deleting it. I tried using the .index() method to find the correct
index, but this does not work if the tabs have been rearranged.Thanks again for any help! On Mar 19, 3:36 pm, rockwild <[email protected]> wrote: > I just recently started using jQuery so I wanted to ask about this > before reporting it as a bug. It appears that occasionally when a tab > is deleted using $("#example").tabs("remove", index) the selected.tabs > property in data is set to -1. This makes any operations done after > the deletion that require the selected tab's index not work when using > the recommended way of getting the currently selected tab index: $ > ("#tab_element").data("selected.tabs");. I tried setting the > selected.tabs value in the "show" callback function, but that didn't > seem to change anything. Here is the function I am using to delete > tabs: > > function deleteTab(){ > var tabEl = $j(".ui-tabs-selected"); > var tabsEl = $j("#tabs"); > if(confirm('Are you sure you want to delete the "' + > tabEl.find > ("span").html() + '" tab?')){ > tabsEl.tabs("remove", tabsEl.data("selected.tabs")); > } > } > > Thank you for any help! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
