add a custom event called tab-selected when the selected item changes