Put your javascript code inside the widget form, and it will be triggered whenever the widget is refreshed.
If you’re tabs are hooked on a click event, a better way would be to use $.delegate
on the widget instance wrapper. That way you don’t need to include the js inside every widget instance…