The trick is to show the element (display:block) but also hide it (visibility:hidden) and to set it’s position to absolute so that it doesn’t affect the page flow.
The MooTools Element.Measure class does this, as Oscar mentioned.
More Related Contents:
- Cross domain iframe issue
- Reloading a single div in an html page [closed]
- jQuery doesn’t give a proper output, but gives these [closed]
- fixing slider on my website [closed]
- How to decode HTML entities using jQuery?
- contenteditable change events
- Avoid dropdown menu close on click inside
- How to properly use jsPDF library
- Reload an iframe with jQuery
- jQuery click not working for dynamically created items [duplicate]
- Stop setInterval
- Finding line-wraps
- How to get the element clicked (for the whole document)?
- How to clear the contents of an iFrame from another iFrame
- Prevent form redirect OR refresh on submit?
- Creating a jQuery object from a big HTML-string
- How to format/tidy/beautify in JavaScript
- JavaScript – head, body or jQuery?
- jQuery: get data attribute
- Creating a select box with a search option
- Jquery Event Not Triggering for DOM Elements Created after page load [duplicate]
- Javascript function to Rotate a base 64 image by X degrees and return new base64
- How to handle in textarea?
- How to resize Twitter Bootstrap modal dynamically based on the content
- Prevent browser from loading a drag-and-dropped file
- How to change URL in browser without navigating away from page?
- How to bind click event to object tag?
- Retain scrollbar position even after reloading using javascript
- Count Words and Characters [closed]
- How can I calculate the difference between two times that are in 24 hour format?