text: /******************************************************************************
    Our plugin code comes first in this document. Normally, plugins would
    appear in separate files named jquery.plugin-name.js, but for our examples
    it's convenient to place this plugin code in the same JavaScript file as
    the code that calls it.
  ******************************************************************************/
  
  
  /******************************************************************************
    End plugin code; begin custom script code.
  ******************************************************************************/
  
  $(() => {
    $('#topics a')
      .click((e) => {
        e.preventDefault();
        const topic = $(e.target).text();
  
        $(e.target)
          .addClass('selected')
          .siblings('.selected')
          .removeClass('selected');
  
        $('#news tr').show();
        if (topic != 'All') {
          $(`#news tr:has(td):not(:contains("${topic}"))`)
            .hide();
        }
      });
  });
  