JSFiddle - React, Tailwind, and code Playground

HTML

<input type="radio" name="show_type" id="btn1" value="A">A
<input type="radio" name="show_type" id="btn2" value="B">B

JavaScript

$(function(){

  function resortTable(){
        alert(1);
    $('#table_sts').tablesorter({
      ignoreCase: false,
      sortInitialOrder: 'desc',
      headers: {
        0: {sorter: false}
      }
    });
  }

  $('input[name=show_type]').change(function() {

      console.log($(this).val());
      if($(this).val() == "B")
      {
        resortTable();
      }
  });
});