title: re-invoke collapsible effect with jquery after jquery AJAX response
body: <p>I have a collapsible rows effect in html table which is given via jquery. This works fine without the ajax poll, but when an ajax update happen the collapse effect wont work, is there anything that i'm doing wrong here. </p>
  
  <p>Note:
  sometimes when user clicks the + sign it changes to - sign but the rows doesn't show, and most of the time even this works for double click</p>
  
  <p>.xhtml page</p>
  
  <pre><code>&lt;tbody&gt;
  &lt;ui:repeat var="trY" value="#{dataBean.bdata}"&gt;
  &lt;tr class="main-#{trY.symbol}"&gt;
  &lt;td&gt;&lt;span id="more-#{trY.symbol}"&gt;
      &lt;ui:fragment rendered="#{trY.has == '+'}"&gt;
      &lt;a id="a-#{trY.symbol}" class="plus" href="#" style="color: black;" name="+"&gt;+&lt;/a&gt;
      &lt;/ui:fragment&gt;
      &lt;/span&gt;
  &lt;/td&gt;
      &lt;/tr&gt;
      &lt;ui:repeat var="trB" value="#{trY.comp}" varStatus="st"&gt;
  &lt;tr class="orB-#{trY.symbol}"&gt;
  &lt;td class="tbl_column_buy1"&gt;
         &lt;div class="qty_margins"&gt;
         &lt;span id="orBbidQty-#{trY.symbol}#{st.index}"&gt;#{trB.bidQuantity}&lt;/span&gt;
         &lt;/div&gt;
  &lt;/td&gt;
  &lt;td class="tbl_column_buy2"&gt;
       &lt;div class="qty_margins"&gt;
        &lt;span id="orBbidPrice-#{trY.symbol}#{st.index}"&gt;#{trB.bidPrice}&lt;/span&gt;
       &lt;/div&gt;
  &lt;/td&gt;
  &lt;td&gt;&amp;nbsp;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/ui:repeat&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>JQuery scripts</p>
  
  <pre><code>$(document).ready(function() { 
      $('.orB').hide();
      $(".plus").click(function(){
          var id = $(this).attr('id');
                  id = id.split('-');
  
          if($("#a-"+id[1]).html() == '+'){
              $(".orB-"+id[1]).show();
              $("#a-"+id[1]).html("-"); 
          }else if($("#a-"+id[1]).html() == '-'){
              $(".orB-"+id[1]).hide();
              $("#a-"+id[1]).html('+');
          }
          return false;
      });    
  });
  
      function orBK(){
              $(".plus").click(function(){
          var id = $(this).attr('id');
                  id = id.split('-');
  
          if($("#a-"+id[1]).html() == '+'){
              $(".orB-"+id[1]).show();
              $("#a-"+id[1]).html("-"); 
          }else if($("#a-"+id[1]).html() == '-'){
              $(".orB-"+id[1]).hide();
              $("#a-"+id[1]).html('+');
          }
          return false;
      });   
      }
      /* ajax timer to update */        
      $(document).ready(function() {
      var i = setInterval(function ()
                  {
  
                      $.ajax({
                            type : "POST",
                            url : 'http://localhost:8080/myproject/faces/trade/dataPage.xhtml',
                            dataType : "json",
  
                            success: function(data) {
  
  
                             $.each(data, function(i, item) {
  
  
                   if(data[i].Has == "+" ){
                     $("span[id*='more-"+data[i].Symbol+"']").html("&lt;a id='a-"+data[i].Symbol+"' class='plus' href='#' style='color: black;'&gt;+&lt;/a&gt;");
                   }
                   if(data[i].comp != null){
                      for(var j=0; j&lt;data[i].comp.length; j++){
                          $("span[id*='orBbidQty-"+data[i].Symbol+""+j+"']").text(item.comp[j].BidQuantity);
                          $("span[id*='orBbidPrice-"+data[i].Symbol+""+j+"']").text(item.comp[j].BidPrice);
                      }
                   }
                          });   
                             $(".plus").unbind('click', orBK);
                             $(".plus").bind('click', orBK);
                            },
                            error : function() {
                              alert("Sorry, The requested property could not be found.");
                            }
                          });
                  }, 4000);
  
  }); 
  </code></pre>