No-Library (pure JS), HTML, CSS, JavaScript
jQuery 2.0.2, HTML, CSS, JavaScript
This fiddle demonstrates that there is no need to use the .style property to find offsetWidth and offset.Height