I am using JQuery UI tabs , to get the current selected tab i am using ui.index but i want an
index of last clicked tab.
for example,
initially tab 1 is loaded
after that if i click tab 3 then in show method i can fetch tab 1’s index
and the same way if i click on tab 1 then i can fetch tab 3’s index.
Why not just set a prevTab variable that is accessed during the show method and then reset to be the current tab?
You could also set a cookie with the previous tab index.