[Greasemonkey] delay rendering while changing css-display mode of
divs
Jeremy Dunck
jdunck at gmail.com
Fri Mar 31 18:13:13 EST 2006
On 3/31/06, Chris Hayes <chayes at antenna.nl> wrote:
> Jeremy Dunck wrote:
> > On 3/30/06, Chris Hayes <chayes at antenna.nl> wrote:
> > > This takes a while and I was wondering whether this might be caused by
> > > the browser re-rendering the page 4000 times.
> >
> > Yep, I've seen that before.
> >
> > If you can, remove the menu root node from the document (perhaps
> > replacing it with "building tree" msg), set your values, then append
> > it back.
> If I *remove* the node, can I still access it? Or do you mean to
> *display:hide* it?
Yes, if you keep a reference to it. ;-)
var b = document.body;
var keepForLater = b.removeChild(b.firstChild);
...do stuff...
b.insertBefore(keepForLater,b.firstChild)
But display:none is a fine idea and simpler to try first.
More information about the Greasemonkey
mailing list