Here is another technique for modern browsers that doesn't require setting the parent display, which can cause issues in some cases.

http://dabblet.com/gist/26947f3abf990a303a09