Rename jQuery tabs?

Is it possible to rename all the tabs in the jQuery UI tab control? My tabs are numbered from 1..N and you can delete a tab from it. I want to "rename" the rest of the tabs so that they are numbered 1,2,3,4,5,6 and 1,2,3,5,6,7 when you delete the fourth tab. They should be named by index based on 1.

+1


source to share


1 answer


If you are using Tabs_3 it is very easy. Just:



var n = 1;
$('#example > ul span').each(function() { this.innerHTML=n;n++; });

      

+1


source







All Articles