Sorry for the delay. 1: More details: I created a page with tabs, and in some tabs I might have some elements that can produce events by them selfs. As a reaction to some events in some cases, I needed to close a tab. I could not now the index of the tab that was containing the obect that produced the event. BUT: I realised that my object is allways a child element of the div that is a tab panel, so the tab index can be obtained searching the index of the object's parent.
2: I was looking for this code: var tabIndex = $("#tabs>div").index(targetObject.parentNode); if (tabIndex != undefined && tabIndex > 0) { $("#tabs").tabs('remove', tabIndex); $("#tabs").tabs('select', 0); } Thanks for the interest.