title: add id dynamically to jquery tabs
body: <p>I am creating jquery tabs dynamically. I want to associate the the id to each tab. </p>
  
  <pre><code>$(function() {
      var index = 0;
      $("#addTab").live('click', function() {
          index++;
          var title = 'Tab.....  ' + index;
          var url = '#fragment-' + index;
  
          addTab(url, title, index);
          $('li.ui-state-default').attr("id",index);
  });
  </code></pre>
  
  <p>This code successfully assigns the id. But when I create a new tab. It assigns the id to whole class. I didn't want to do this. I just want to assign the unique id to each class</p>
  
  <p>JS Fiddle</p>
  
  <p><a href="http://jsfiddle.net/gP3YZ/9/" rel="nofollow">http://jsfiddle.net/gP3YZ/9/</a></p>