Thursday 29 October 2015

Clear jQuery Table records tip

To Clear a dynamic HTML Datatable using JQuery is very easy using following approach

while creating dynamic  table rows just append some unique Class name to the row element e.g.


 var divMain = $('<div>').addClass(' DynamicActivityRow').attr('id', 'div_activity' + i);

If you want to clear the table just do this.

  $(".DynamicActivityRow").remove();


Hope it helps.