entropia
10/4/2017 - 12:11 PM

Variable Overlay

Reads the Original Element's height and width and changes it in Overlay's css

//Getting the Original Element height and width
var overlayheight = jQuery('#original-element').height();
var overlaywidth = jQuery('#original-element').width();

//Setting the Overlay's height and width equal to the original element's
jQuery('#overlay').css({ height : overlayheight + "px" }); 
jQuery('#overlay').css({ width : overlaywidth + "px" });