5

I need to wait for a certain object to load while it is hidden. But what appears to be happening, is that it only loads without the display:none;

I'm using jQuery, and I tried putting the .load on the object to call a function when it loads, but seems that it will not load, because it's hidden.

Is there a way of 'forcing' the load of the Object, or, another way to 'hide' but still loading?

How to do it correcly:

use visibility: hidden instead of display: none

as explained here: http://www.w3.org/TR/SVG/painting.html#VisibilityProperty

When the ‘display’ property is set to none, then the given element does not become part of the rendering tree. With ‘visibility’ set to hidden, however, processing occurs as if the element were part of the rendering tree


Load it off screen, style="position:absolute;left:100000px"

4

3 に答える 3

3

How to doit correcly:

use visibility: hidden instead of display: none

as explained here: http://www.w3.org/TR/SVG/painting.html#VisibilityProperty

When the ‘display’ property is set to none, then the given element does not become part of the rendering tree. With ‘visibility’ set to hidden, however, processing occurs as if the element were part of the rendering tree

thanks to @SomeKittens

于 2012-08-05T04:52:54.977 に答える
3

画面外にロードし、style="position:absolute;left:100000px"

于 2012-08-05T04:29:26.513 に答える
2

It seems that an SVG will not be rendered if the element is set to display:none. It's possible to load every element individually with JS as shown in this answer.

于 2012-08-05T04:46:28.477 に答える