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.
This seems to work:
$(window).width() / parseFloat($("body").css("font-size"));