jQuery – Get Width of Element when Not Visible (Display: None)
Here is a trick I have used. It involves adding some CSS properties to make jQuery think the element is visible, but in fact it is still hidden. var $table = $(“#parent”).children(“table”); $table.css({ position: “absolute”, visibility: “hidden”, display: “block” }); var tableWidth = $table.outerWidth(); $table.css({ position: “”, visibility: “”, display: “” }); It is kind … Read more