0

There is a React function that returns a list of card elements.

enter image description here

When we click one of the elements, the class attribute value becomes card expanded.

What can we do in JavaScript or jQuery to detect a change in one of these class attributes? When a change is detected on click, I want to check if the element is within viewport, and if so, scroll the element into view.

Any idea how to do the first part?

Marco V
  • 2,553
  • 8
  • 36
  • 58

0 Answers0