I\'m looking for a reliable way to get the width of the window in em units using javascript. I was surprised to see that jQuery will only return a result in pixel measurements.
For those who need it all put together, this code works for me:
Window size: pixels or ems
It's put together using the answer above added to the window-width test code found in the linked tutorial.