title: Unable to invoke select event dynamically on tab in jQuery
body: <p>I have created tabs by using jQuery API and have bound one event handler on the click of second tab by using the below code:</p>
  
  <pre><code>    $('#tabs').bind('tabsselect', function(event, ui) {
          refreshRemoveUI(event,ui);
      });
  
  function refreshRemoveUI(event,ui) {
      if(ui.index==1){
          $.get('FrontServlet?operation=getAllQues',function(data) {
              var html = "";
              var questionsNum = data.split(",");
              if(questionsNum!="") {
                  html += '&lt;br/&gt;&lt;input type=checkbox name=removeAllQuestionId id=removeAllQuestionId onclick="toggleAll(this.checked)"/&gt; Select/Deselect All&lt;br/&gt;';
                  for(var i=0;i&lt;questionsNum.length;i++){
                      html += '&lt;br/&gt;&lt;input type=checkbox name=removeQuestionId id=removeQuestionId /&gt; ' + questionsNum[i];
                  }
                  $('#remove').show();
              } else {
                  $('#remove').hide();
                  html = 'No question available in quiz';
              }
              $('#removequestions').html(html);
              });         
      }
  }
  </code></pre>
  
  <p>I want to invoke the same bind event on the completion of ajax request too and following is what I have tried but no luck:</p>
  
  <pre><code>    $.get('FrontServlet?operation=remove&amp;position='+val, function(data) {
          $("#tabs li.ui-state-default:nth(1)").trigger("select");
  
      });
  </code></pre>
  
  <p>Any ideas guys?</p>