Style table row when clicked
Hi . I want to style a table row when it is clicked . I could use the following JS , but would rather to it in native toddle . Plus I don 't know how I could use a conditional style using this . document .querySelectorAll ( ' .table -row ' ) .forEach (row = > { row .addEventListener ( 'click ' , ( ) = > { / / Remove 'clicked ' class from all rows document .querySelectorAll ( ' .table -row ' ) .forEach (r = > r .classList .remove ( 'clicked ' ) ) ; / / Add 'clicked ' class to the selected row row .classList .add ( 'clicked ' ) ; } ) ; } ) ; Unless there ’s something other than a click which could control the logic