July 4, 2023 by Andreas Wik
To create a Live Expression, simply open up the Developer Tools and click the little eye icon, as seen below.
Write your expression and hit Enter. For example, to keep track of the number of elements with a class of .info-div, type $$(‘.info-div’).
The value will now be updated in real-time as elements with the same class are added/removed.
To keep track of window.scrollY, simply add that as your expression:
Or Date.now() to keep track of that value real-time:
Let’s say you have a header element and want to keep track of its height: