mistic100 / jQCloud

jQuery plugin for drawing neat word clouds that actually look like clouds
mistic100.github.io/jQCloud
MIT License
268 stars 106 forks source link

Building a worcloud element on display none element #22

Closed pranshuagrawal closed 7 years ago

pranshuagrawal commented 8 years ago

How can I build a wordcloud on a hidden element so that when I switch its display to blcok it should just appears to be a normal wordcloud?

mistic100 commented 8 years ago

You can't, size computations cannot be done on display:none elements because the browser remove them from the render stack and thus they have no size.

The only thing you can do is visibility:hidden (combined with a position:absolute or a float to remove it from the flow and to not alter your display).

But I don't really understand why you want to to that, just initialize the cloud when needed.