Closed Joebu closed 6 months ago
That's somewhat based on how you're loading elements. There's a few options...
$(window).off('resize.fittext orientationchange.fittext)
destroy()
methodfont-size: clamp( 1rem, 10vw, 3rem)
(replacing your own min/max values there).Thanks. (I'm not that css expert )
Repeatedly calling
fitText
is creating a memory leak I call it each time I load data since it is always a different amount of elements. I was observing an increase in memory on each call. till it boiled down to thefitText
call, since in each call its subscribing to an event and never unsubscribes this line