Can you be more specific about why you were "hoping to do this with jQuery", as well as EXACTLY what you are trying to accomplish?
When defining some CSS and applying a class can be used, it is almost always a superior solution to meddling with dimensions with jQuery. You can certainly use percentages in your CSS rather than pixels.
If you only need to support modern browsers, you can use VW and VH:
Sure, understood. I'm not limited to JQuery, I was just under the impression that was the best way to do it.
I have a HTML 5 game in the middle of the screen, contained within a div (with a border).
What I'd like to do, is have this bordered div appear to be a window with an icon in the top-right corner to expand the game to 90% of the screen size (and darken the background area) - this expanded div will then have a shrink icon to reset the div back to its original size.
Since you also want to darken the background, I'd suggest you add a class to <body> rather than to the game container. That way, you can kill two CSS birds with one jQuery stone.
When the game is expanded, you would have:
Now you can style the ANYTHING on the page differently when <body> has class big_game, just by writing CSS. I've left out details below, it is just a skeleton to show the general idea. You would need to also use flexbox CSS and layout to conveniently center.