1 | | The "show and hide" fix to this is also discouraged by jQuery for good reason. It's a negative for UX and performance. |
2 | | |
3 | | |
4 | | |
5 | | |
6 | | |
7 | | "jQuery will attempt to temporarily show and then re-hide an element in order to measure its dimensions, but this is unreliable and (even when accurate) can significantly impact page performance. This show-and-rehide measurement feature may be removed in a future version of jQuery." |
8 | | |
9 | | |
10 | | Additionally, while the support for the "open" class would be a nice addition, it still doesn't fix the underlying issue with this. |
11 | | |
12 | | I agree this is most likely an issue with `Element.outerWidth()`. |