How to target a button group in typescript?

Viewed 31

I'm trying to get an Isotope Filter working with Typescript.

The code I need to work in TS which I can only find in jQuery is:

$('.filters-button-group').on( 'click', 'button', function() {
  var filterValue = $( this ).attr('data-filter');
  // use filterFn if matches value
  filterValue = filterFns[ filterValue ] || filterValue;
  $grid.isotope({ filter: filterValue });
});

The main part I don't understand is the first line - how to I target a button group click in TS? The .filters-button-group class surrounds a number of <button>s.

0 Answers
Related