I think that function is save to use. The resize event is only called when the window is resized, no? So on a bigger tablet that would be switching back and forth from horizontal to vertical, and that’s exactly what you want..
Please note transitions look a bit jerky compared to jQuery slide, not sure why that is.
Don’t really know. Have been transitioning
max-height in things like this and they feel fine to me.
addClass, I think that’s a matter of preference and/or related how it is used in the CSS. Can imagine doing it like this makes it a bit more flexible and easier to handle in media-queries with overriding values; unambiguous.