title: jQuery replace table rows with new data
body: <p>I'm trying to replace a table with new data I get via ajax. The first time works just fine, but then the rows get added instead of replaced, so I end up with duplicate rows. </p>
  
  <p>Here's some of my code:</p>
  
  <pre><code>            success: function(data){            
              $("#featured_listing_tbody").children( 'tr:not(:first)' ).remove();
              counter= 1;
              $.each(data, function(i, val){  
                          newPropertyRows += '&lt;tr&gt;';
                                  $.each(val, function(key, info){
                                      var skip = false;
                                          if(key == "Id") {                                           
                                                  Id =  info;
                                                  newPropertyRows += '';
                                                  skip = true;
                                          }
                                          if(key == "thumbs"){
                                                  info = '&lt;img width="100px" src=uploads/properties/'+Id+'/thumbs/'+info+' /&gt;';
                                                  newPropertyRows += '&lt;td class="col'+counter+'"&gt;&lt;a href="/featured.php?prop='+Id+'"&gt;'+info+'&lt;/a&gt;&lt;/td&gt;';  
                                                  skip = true;
                                                  counter++;      
                                          }
                                          if(skip == false){
                                                  newPropertyRows += '&lt;td class="col'+counter+'"&gt;&lt;a href="/featured.php?prop='+Id+'"&gt;'+info+'&lt;/a&gt;&lt;/td&gt;';                      
                                                  counter++;      
                                          }
  
                                          info = '';
                                  });                     
                          newPropertyRows += '&lt;/tr&gt;';                         
              });                     
                  $("#featured_listing_tbody").html(newPropertyRows);
          }
  </code></pre>