Append a table to a div then style it using css

Append a table to a div then style it using css

I have this data i am getting from the database and creating a table out of it.

  1. $.get("getall.php", function(data){
  2. $(.tablebody').append(data);
  3. });

I am then trying to style it using css

  1. .current{background-color:pink;}
  1. $('tr:first-child').next().addClass("current");
The row isn't being given the background.