onBeforeTabClose?

I a tabbar, with each tabbar containing a DIV, that gets its populated by code from a 3rd party product. If I have an event on the tabbar for onTabClose it goes to reference something in the DIV to cleanup, but the DIV has already been destroyed. With jquery easyui I was able to us onnbeforeclose for a tab, is there a way I can do this with tabbar so that I can unregister things in my Div before tabbar destroys it?

Many thanks.

For saving your attached object i suggest using the approach described in my example:

  1. in the tab A i have Tree in a Div
  2. when tab A is closing, Div with Tree are attaching to the document body (not destroying)
  3. Tabbar sets active tab B with Button
  4. when you click the Button, it adds tab C and attaches there Div with Tree from the body
    tab_closing.rar (433 KB)