I am assigning the unique ids to the div by selecting their class
$("#addTab").live('click', function() {
index++;
var title = 'Tab..... ' + index;
var url = '#fragment-' + index;
addTab(url, title, index);
$('li.ui-state-default:last').attr("id",index); // How I can get the current class??
});
But I want to assign these ids to current tab. coz last tab is not getting the id
JS Fiddle: http://jsfiddle.net/ranasaani/DsA8T/1/
every selected tab has class
ui-selected,ui-state-focusandui-state-activeSo you can get class like
To get class of newly added tab try:
DEMO