after clicking a tab, remember which tab was clicked