Let's say I have to remember the initial height of certain element.
A common practice I see is to save this value with $.data
on that element.
I fail to understand the benefits of this. Why not simply keep a simple variable with that value, or an array with values if there are multiple elements? Keeps the code easy to understand.