Am adding dynamic data to Table , from AJAX call , I want to read the row which contain "BLOCK" string in it , if it is there add RED color to it ?How can I achieve this.......?Below is my current code\[code\] success: function(xml) { var block_count; var xmlDOM = $(xml); block_count = $(xml).find('item').length; xmlDOM.find("item").slice(position,position+page_size).each(function() { var $this=$(this); var $user=$this.find("user").text(); var $tag=$this.find("tag").text(); var $action=$this.find("action").text(); var $time=$this.find("time").text(); $("#datatable").append("<tbody><tr class='datarow'><td>"+$time+"</td> <td>"+$user+"</td><td>"+$url+"</td><td>"+$action+"</td></tr><tbody>"); }); <table id='datatable' width="100%" cellpadding="7" cellspacing="1" style="line-height: .9em;"> <thead> <tr id='tableheader'> <th>Time</th><th>User</th><th>tag</th><th>Action</th> </tr> </thead> </table>\[/code\]EDIT :The table looks like this image
Thank you