Page 1 of 1

Document.Ready section - How?

Posted: Mon Jan 06, 2020 7:33 pm
by MorningLight
How can I insert a code in the "document.ready" section of a page?

Thank you!

Re: Document.Ready section - How?

Posted: Mon Jan 06, 2020 7:41 pm
by BaconFries
First please note that WB is not a HTML Editor but a HTML Generator this means that you cannot directly edit the HTML. With this said you can use the HTML OBJECT Also note there's no help with coding/scripts.

Re: Document.Ready section - How?

Posted: Mon Jan 06, 2020 7:47 pm
by MorningLight
Yes, I understood the point @Bacon.

I'm trying to avoid the "flicking" effect to hidden with some components having "OnScrollRevealPartial", when the page starts.

I tried to set them as "FadeOut" on event "BeforeLoad" but even this, I see the component "flick" (it appears and disappears quikly).

Re: Document.Ready section - How?

Posted: Mon Jan 06, 2020 9:03 pm
by jerryco
Ah yes. Try setting the thing you don't want to flicker to invisible in WWB. Been a long time.

Re: Document.Ready section - How?

Posted: Mon Jan 06, 2020 9:21 pm
by Pablo
There is a 'ondocumentready' event in the page properties.
But if you use CSS3 animations with onscrollreveal, then the objects will be hidden automatically.

Re: Document.Ready section - How?

Posted: Tue Jan 14, 2020 7:53 pm
by MorningLight
Hi,

@jerryco, the "HIDE" settings on the Page load does not function as expected. The Layoutgrid flicks in anyway and the "Show by CSS3" does not unhide it.

Thanks anyway.

Re: Document.Ready section - How?

Posted: Tue Jan 14, 2020 7:56 pm
by MorningLight
@Pablo,

I utilize "OnScrollRevealPartial" because it seems more convenient to people whom has smaller browse window (like vertical = 400).
And the components/layout grid flicks in the page initial display as well.

Anyway, I'll research something to solve this... I'll post here if I'll get sucess.

Hugs!

Re: Document.Ready section - How?

Posted: Tue Jan 14, 2020 8:29 pm
by MorningLight
OMG :roll:

I saw a STUPID post calling this effect as a Chrome bug and recommending....

Code: Select all

<script> </script>
... at the end of page. In resume, just a space into a <SCRIPT> declaration!

It functions!

Pablo, what do think about implementing this code as a default in all new pages?

To see more:
https://lab.laukstein.com/bug/input

Hugs!

Re: Document.Ready section - How?

Posted: Wed Jan 15, 2020 8:10 pm
by MorningLight
:cry:

Hmmm.... this tip functions sometimes, not at all.

I still have the layoutgrid "flicking" at the page loading...

I'll continue my research on this.