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
- $(document).on('click', '.block-news-row', function () {
- var ID = $(this).attr("ID");
- $.ajax({url: "block-news.php?ID=" + ID, success: function(result){
- $(this).html('Unblock');
- $(this).toggleClass('block-news-row', 'unblock-news-row');
- }});
- });