trying to work out why this code doesn't work

trying to work out why this code doesn't work

When I debug it, I get something on the click even and get the correct ID for the clicked element, however, the LINK doesn't change to Unblock and the CSS doesn't change

  1. $(document).on('click', '.block-news-row', function () {
  2. var ID = $(this).attr("ID");  
  3. $.ajax({url: "block-news.php?ID=" + ID, success: function(result){
  4. $(this).html('Unblock');
  5. $(this).toggleClass('block-news-row', 'unblock-news-row');
  6.     }}); 
  7. });