tabs: allow negative indexes
while looking at the tabs code, I noticed that it is currently using the numeric value -1 to identify that no tab is selected. a few points in the code special-case -1 in the index.
But, arrays can work with negative indexes. With very little effort the code can be made to accept negative arrays. This would cause the code:
- $('#tabs').tabs('select',-1);
To select the last tab.
I propose to stop special-casing -1, otherwise negative indexes aren't possible.
My primary candidate to special-case the index is NaN, which is also a typeof number. Otherwise it can be any other type.